-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 に答える