ORDER BY ... Some small help.
#1

Hi guys:

pawn Код:
format( szQuery, sizeof szQuery, "SELECT `Name`,`GangKills` FROM `Accounts` ORDER BY (`GangKills`) WHERE `GangID` = '%d' DESC LIMIT 5", GangID );
I have this syntax, and when I use it, this appear in "debug.txt":

Код:
[18:35:27] errorid: 1064 | 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 `GangID` = '2' DESC LIMIT 5' at line 1 | resultid: 22 | extraid: -80652920 | callback: OnQueryFinish | query: SELECT `Name`,`GangKills` FROM `Accounts` ORDER BY `GangKills` WHERE `GangID` = '2' DESC LIMIT 5
What is wrong?
Reply


Messages In This Thread
ORDER BY ... Some small help. - by Edvin - 27.08.2012, 15:30
Re: ORDER BY ... Some small help. - by HuSs3n - 27.08.2012, 15:52
Re: ORDER BY ... Some small help. - by ddnbb - 27.08.2012, 16:00
Re: ORDER BY ... Some small help. - by HuSs3n - 27.08.2012, 16:02
Re: ORDER BY ... Some small help. - by Unte99 - 27.08.2012, 16:07
Re: ORDER BY ... Some small help. - by Edvin - 28.08.2012, 06:51

Forum Jump:


Users browsing this thread: 1 Guest(s)