Error with this MySQL_Query Line?
#1

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.
Reply
#2

Try this

pawn Код:
"SELECT * FROM `arecords` ORDER BY `id` WHERE `PSQLID` = %d DESC LIMIT 10"
Reply
#3

Thank you! REP ++; < See what I did there
Reply
#4

Query is correct as far as I can see. Possibly an inadequate string length.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)