-2

你好,我有一些错误,我看不到它,但是访问网站的成员,告诉我那里有错误

$query = mysql_query("
SELECT

m.member_id as member_id,
m.member_group_id as member_group_id,
m.members_display_name as members_display_name,
m.email as email,
m.joined as joined, 
m.member_login_key as member_login_key,
m.msg_count_new as msg_count_new,

p.pp_thumb_photo as pp_thumb_photo,
p.pp_photo_type as pp_photo_type

FROM        ".$forum_prefix."members m
LEFT JOIN   ".$forum_prefix."profile_portal p ON p.pp_member_id = m.member_id

WHERE m.member_id = ".$id."
") or die(mysql_error());

和错误

 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 17
4

2 回答 2

0
$forum_prefix = "table_name";// put table name here.its empty in your code
$id = 2;//put your id here and check
$query = mysql_query("
SELECT

m.member_id as member_id,
m.member_group_id as member_group_id,
m.members_display_name as members_display_name,
m.email as email,
m.joined as joined, 
m.member_login_key as member_login_key,
m.msg_count_new as msg_count_new,

p.pp_thumb_photo as pp_thumb_photo,
p.pp_photo_type as pp_photo_type

FROM        ".$forum_prefix."members m
LEFT JOIN   ".$forum_prefix."profile_portal p ON p.pp_member_id = m.member_id

WHERE m.member_id = ".$id."
") or die(mysql_error());
于 2012-09-03T14:00:50.870 回答
0
于 2012-09-03T14:15:02.017 回答