I am trying to execute a LEFT JOIN query however I am getting a syntax 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 'LEFT JOIN lr_users ON lr_capped_members.user = lr_users.user_id WHER' at line 2
I have checked my code for errors (ie: missing commas, incorrect table names, etc), however Can not find a fault. It maybe that I have tunnel vision form working on this code all day so I would much appreciate your assistance. Please find below my 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 WHERE cap_week = '$week' ")or die(mysqli_error($con));