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: MySQL Error (
/showthread.php?tid=301770)
MySQL Error -
BleverCastard - 05.12.2011
Can someone help me I get this everytime I /savedata:
Код:
errorid: 1064 | error: 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 ''Go', businessOwner = 'NPC_STATE', businessPrice = '0', businessVault = '905', b' at line 1 | resultid: -1 | extraid: -1 | callback: NULL | query: UPDATE businesses SET businessExteriorX = '-2478.732910', businessExteriorY = '2318.402099', businessExteriorZ = '4.984375', businessInteriorX = '-27.037883', businessInteriorY = '-57.808139', businessInteriorZ = '1003.546875', businessInterior = '6', businessType = '1', businessName = '24/7 Stop'n'Go', businessOwner = 'NPC_STATE', businessPrice = '0', businessVault = '905', businessLock = '0', businessMiscX = '0.000000', businessMiscY = '0.000000', businessMiscZ = '0.000000' WHERE businessID = '3'
Re: MySQL Error -
Pinguinn - 05.12.2011
pawn Код:
UPDATE businesses SET
businessExteriorX = "-2478.732910",
businessExteriorY = "2318.402099",
businessExteriorZ = "4.984375",
businessInteriorX = "-27.037883",
businessInteriorY = "-57.808139",
businessInteriorZ = "1003.546875",
businessInterior = "6",
businessType = "1",
businessName = "24/7 Stop'n'Go",
businessOwner = "NPC_STATE",
businessPrice = "0",
businessVault = "905",
businessLock = "0",
businessMiscX = "0.000000",
businessMiscY = "0.000000",
businessMiscZ = "0.000000"
WHERE businessID = "3"
You had
pawn Код:
...
businessName = '24/7 Stop'n'Go',
...
You used ' ' to determinate the field value, but you also used those quotes inside the string
It should be: "24/7 Stop'n'Go"