php - Mysql syntax error on LEFT JOIN query -
i trying execute left join query getting syntax error:
you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'left join lr_users on lr_capped_members.user = lr_users.user_id wher' @ line 2
i have checked code errors (ie: missing commas, incorrect table names, etc), can not find fault. maybe have tunnel vision form working on code day appreciate assistance. please find below code.
$member_qry = mysqli_query($con, "select lr_capped_members.user, lr_users.username left join lr_users on lr_capped_members.user = lr_users.user_id cap_week = '$week' ")or die(mysqli_error($con));
you forgot from
part of query. you'll want write :
$member_qry = mysqli_query($con, "select lr_capped_members.user, lr_users.username lr_capped_members left join lr_users on lr_capped_members.user = lr_users.user_id cap_week = '$week' ")or die(mysqli_error($con));
Comments
Post a Comment