0

我将 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)

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

但是我找不到这些值存储在哪个“phpbb_xxxx”表和字段中。请问有人知道吗?

谢谢!亚历克斯

4

1 回答 1

0

好的,我通过更改用户的性别和区分数据库转储找到了它——它在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);
于 2010-12-26T20:26:31.387 回答