SQL syntax error?
#1

Im getting an error in my syntax but i cant find it.
Error:
Код:
[23:06:10] CMySQLHandler::Query(SELECT * FROM `playervehicles` WHERE `owner`= 'Whatcha' LIMIT 1 DESC) - An error has occured. (Error ID: 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 'DESC' at line 1)
Query:
pawn Код:
format(String,sizeof(String),"SELECT * FROM `playervehicles` WHERE `owner`= '%s' LIMIT 1 DESC",PlayerName(playerid));
Reply
#2

pawn Код:
VALUES ('%s','%i','%s','%f','%f','%f','%f','%i','1','1')
Is not the correct syntax.

pawn Код:
VALUES ('%s',%i,'%s',%f,%f,%f,%f,%i,1,1)
You only need to put apostrophes around the %s placeholder, or more accurately, a string.
Reply
#3

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
pawn Код:
VALUES ('%s','%i','%s','%f','%f','%f','%f','%i','1','1')
Is not the correct syntax.

pawn Код:
VALUES ('%s',%i,'%s',%f,%f,%f,%f,%i,1,1)
You only need to put apostrophes around the %s placeholder, or more accurately, a string.
Fixed that error. Now its a different one.
Reply
#4

whats the point in adding "DESC" when theres only "LIMIT 1" 1 result to show....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)