我使用PHPBB 3.0.7-PL1(即将升级)使用CentOS 5.5和PostgreSQL 8.4.6,并在新用户注册时向新用户显示以下其他问题,以防止垃圾邮件:

What is your gender please? Answers: Robot/Man/Woman

我在数据库中找到了相应的条目:

pref=> select * from phpbb_profile_lang;
 field_id | lang_id | lang_name |        lang_explain         | lang_default_value
----------+---------+-----------+-----------------------------+--------------------
        5 |       2 | Sex       | Please specify your gender  |
(1 row)

pref=> select * from phpbb_profile_fields_lang;
 field_id | lang_id | option_id | field_type | lang_value
----------+---------+-----------+------------+------------
        5 |       2 |         0 |          5 | Robot
        5 |       2 |         1 |          5 | Man
        5 |       2 |         2 |          5 | Woman
(3 rows)

我的问题是:我现在想知道,哪个用户是 男人 哪个用户是 女士 (我需要它以俄语在我的论坛中集成的游戏,以便我可以正确地参考玩家)。

但是我找不到存储这些值的位置,其中“ phpb_xxxx”表和字段。有人请知道吗?

谢谢!亚历克斯

有帮助吗?

解决方案

好的,我通过更改用户的性别并差异数据库转储找到了它 - 它在表中 phpbb_profile_fields_data

我在index.php中获取了该值:

$sql = 'SELECT pf_sex FROM ' . 
  PROFILE_FIELDS_DATA_TABLE . 
  ' WHERE user_id=' . $user->data['user_id'];
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
        $pf_sex = $row['pf_sex'];
$db->sql_freeresult($result);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top