Jump to content
MakeWebGames

Recommended Posts

Posted

hi im trying to make a drug streets page for my drugs mod but im gettin an error with my join table query its prob somethink ive missed

$loc is equal to 1

$q=$db->query("SELECT s.*,d.*,i.* FROM drugs_streets s LEFT JOIN drugs_drugs d LEFT JOIN drugs_inv i ON s.drugid = d.drugid WHERE s.location = $loc and i.userid = $userid");

this is the errror i get when i run the code

QUERY 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 'WHERE s.location = 1 and i.userid = 3' at line 1

Query was SELECT s.*,d.*,i.* FROM drugs_streets s LEFT JOIN drugs_drugs d LEFT JOIN drugs_inv i ON s.drugid = d.drugid WHERE s.location = 1 and i.userid = 3

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...