Jump to content
MakeWebGames

melduk

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by melduk

  1. Doesnt work :( 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 '.`cityname` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` L' at line 1 Query was SELECT u.`userid`, u.`username`, u.`level`, u.`hp`, u.`gang`, u.`location`, g.`gangname`, g.`gangPREF` c.`cityname` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` LEFT JOIN `cities` c ON c.`cityID` = 7
  2. Hi, This is ace! This is just what Ive been looking for. Is there a way to make it so that it only shows people in the same city as you though? As obviouslly people not in the same city you can not attack. streetsyndicate - I'm not a coder but on line 8, change to: $users = $db->query ("SELECT u.`userid`, u.`username`, u.`level`, u.`hp`, u.`gang`, g.`gangname`, g.`gangPREF` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` limit 5"); This will limit it to displaying 5 (as you can see on the end there is now limit 5, change this to limit 4 if you want it to display 4). Thanks. P.S. I test the above and it works.
×
×
  • Create New...