SA-MP Forums Archive
mysql - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: mysql (/showthread.php?tid=154542)



mysql - armyoftwo - 14.06.2010

Код:
[15:30:44] Error in mysql_query: 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 '',0,0,0,0)' at line 1
How can i fix this?


Re: mysql - Carlton - 14.06.2010

Post your query.


Re: mysql - armyoftwo - 14.06.2010

Quote:
Originally Posted by Carlton
Post your query.
Код:
	format(query, sizeof(query), "SELECT playerid, adminlevel, playername, password, x, y, z, o, interior, model, money, health, armor, factionid, factionrank, jailed, jailedtime, jobid, paycheck, premium, beenpaid, badge, bomb, wtchannel, paydaytime, jobrank, worldid, dl, pl, cdl, cl, pp, wl FROM players WHERE playername='%s'",playername);
This one?


Re: mysql - armyoftwo - 15.06.2010

anyone?


Re: mysql - FabianoC - 15.06.2010

Doesn't seem like it, but line 1 in your thingy would be easy to find...

wl FROM players WHERE playername='%s'",playername); <<< At that part maybe?


Re: mysql - mprofitt - 15.06.2010

More than likely, in your format statement, the number or type of variables do not match.

Quote:
Originally Posted by armyoftwo
Код:
[15:30:44] Error in mysql_query: 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 '',0,0,0,0)' at line 1
How can i fix this?



Re: mysql - armyoftwo - 15.06.2010

most likely variable types doesn't match...


Re: mysql - mprofitt - 15.06.2010

Why do you have to repeat exactly what I just said?

Quote:
Originally Posted by armyoftwo
most likely variable types doesn't match...



Re: mysql - FabianoC - 15.06.2010

Yes, that means you forgot some words in the line, maybe added too much, or misplaced the: ,
It's all possible, so check the template.


Re: mysql - armyoftwo - 15.06.2010

Quote:
Originally Posted by mprofitt
Why do you have to repeat exactly what I just said?

Quote:
Originally Posted by armyoftwo
most likely variable types doesn't match...
I'm not repeating you, i'm just saying what's the problem exactly. o_0