SA-MP Forums Archive
MySQL error #1054 - 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: MySQL error #1054 (/showthread.php?tid=643272)



MySQL error #1054 - Mado - 16.10.2017

Hi all,

I recently got back into SAMP and I am trying to set up some basics in a scratch gamemode, I am trying to make a basic database functionality.

This query is generated to store information;
Код:
UPDATE 'players' SET pAdminLevel = '0', pXpos = '-507.795257', pYpos = '-92.722236', pZpos = '62.447505', pInterior = '0', pVW = '0', pFaceAngle = '12.000000' WHERE pID = '1'
But I get this error message:
Код:
[14:00:38] [ERROR] error #1064 while executing query "UPDATE 'players' SET pAdminLevel = '0', pXpos = '-507.795257', pYpos = '-92.722236', pZpos = '62.447505', pInterior = '0', pVW = '0', pFaceAngle = '12.000000' WHERE pID = '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 ''players' SET pAdminLevel = '0', pXpos = '-507.795257', pYpos = '-92.722236', pZ' at line 1



Re: MySQL error #1054 - Zeth - 16.10.2017

Check your declaration if you have correctly declared them such as string or float or int and same goes with Database structure.


Re: MySQL error #1054 - Skimmer - 16.10.2017

Change
Код:
UPDATE 'players'
to
Код:
UPDATE `players`
or
Код:
UPDATE players



Re: MySQL error #1054 - Mado - 16.10.2017

Quote:
Originally Posted by Skimmer
Посмотреть сообщение
Change
Код:
UPDATE 'players'
to
Код:
UPDATE `players`
or
Код:
UPDATE players
Thank you! That solved it.