Posts: 1,648
Threads: 482
Joined: Jun 2010
pawn Код:
format(string, sizeof(string), "SELECT * FROM `arecords` WHERE `PSQLID` = %d ORDER BY `id` DESC LIMIT 10", PlayerSQLID[giveplayerid]);
mysql_query(string);
It said:
Quote:
[20:41:16] mysql error 1064: 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 '' at line 1
|
it's probably a stupid mistake, but I'm not sure, I've never used 'Order BY etc.
Posts: 2,593
Threads: 34
Joined: Dec 2007
Try this
pawn Код:
"SELECT * FROM `arecords` ORDER BY `id` WHERE `PSQLID` = %d DESC LIMIT 10"
Posts: 1,648
Threads: 482
Joined: Jun 2010
Thank you! REP ++; < See what I did there
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Query is correct as far as I can see. Possibly an inadequate string length.