SA-MP Forums Archive
strange mysql error - 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)
+--- Thread: strange mysql error (/showthread.php?tid=650005)



strange mysql error - Score - 18.02.2018

Hello, i am getting an error when i am registering ingame.

Here is the code:

PHP код:
[15:51:40] [ERRORerror #1064 while executing query "UPDATE `players` SET `SCORE` = 0, `CASH` = 0, `KILLS` = 0, `DEATHS` = 0, `BAN` = 0, `ADMIN` = 0, `SKIN` = 0, WHERE `ID` = 4 LIMIT 1": 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 `ID` = 4 LIMIT 1' at line 1
[15:51:40] [DEBUGCConnection::GetError(this=0x4d3c020connection=0x292ff0)
[
15:51:40] [DEBUGCCallback::Create(amx=0x27e12e0name='OnQueryError'format='dsssd) 
PHP код:
ALTER TABLE `playersADD `IDINT(12NOT NULL AUTO_INCREMENT FIRSTADD PRIMARY KEY (`ID`); 



Re: strange mysql error - DelK - 18.02.2018

Remove this comma `SKIN` = 0,


Re: strange mysql error - Score - 18.02.2018

Quote:
Originally Posted by DelK
Посмотреть сообщение
Remove this comma `SKIN` = 0,
Thanks! I didn't even notice that


Re: strange mysql error - Sithis - 21.02.2018

Also, the LIMIT 1 statement in your UPDATE query will only limit the rowcount returned from the query. Therefore, I suggest removing it.