MySQL Help - Query - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Help - Query (
/showthread.php?tid=617423)
MySQL Help - Query -
Keyhead - 20.09.2016
What is the problem with this? It's returning nothing in my DB even though there is a row it should pickup.
Код HTML:
SELECT players.id, players.accountname, players.password FROM characters INNER JOIN players ON characters.accountid = players.id WHERE players.accountname = 'Derek' OR `characters`.`username` = 'Derek' LIMIT 0, 1
EDIT: It works with one of my accounts, but it doesn't pickup any of the others even though they are there.
EDIT 2: It seems that it'll return a result if there is a result in both tables. Not only the one.