MySQL error #1054
#1

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

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

Change
Код:
UPDATE 'players'
to
Код:
UPDATE `players`
or
Код:
UPDATE players
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)