SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 22/05/2015, 07:49 AM   #1
SandKing94
Big Clucker
 
Join Date: Jan 2014
Posts: 96
Reputation: 1
Default (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for t

My code:
Code:
format(query,sizeof(query),"UPDATE players SET Admin='%d' , Money='%d' , Skin='%d' , X='%f' , Y'%f' , Z='%f' , Angle='%f'",pInfo[playerid][Admin], pInfo[playerid][Money], pInfo[playerid][Skin], pInfo[playerid][Pos][0], pInfo[playerid][Pos][1], pInfo[playerid][Pos][2], pInfo[playerid][Pos][3]);
    mysql_function_query(Connection,query,false,"","");
Error:
Code:
[10:52:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE players SET Admin='0' , Money='99500' , Skin='0' , X='149", callback: "(null)", format: "(null)"
[10:52:56] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[10:52:56] [ERROR] CMySQLQuery::Execute[] - (error #1064) 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 ''-67.215164' , Z='1.429687' , Angle='269.999969'' at line 1
[10:52:56] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
SandKing94 is offline   Reply With Quote
Old 22/05/2015, 08:02 AM   #2
Deathlane
Big Clucker
 
Deathlane's Avatar
 
Join Date: Dec 2011
Location: Manila, Philippines
Posts: 193
Reputation: 40
Default Re: (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version f

You forgot the WHERE clause in your query.
__________________
Deathlane is offline   Reply With Quote
Old 22/05/2015, 08:31 AM   #3
SandKing94
Big Clucker
 
Join Date: Jan 2014
Posts: 96
Reputation: 1
Default Re: (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version f

Thank you buddy, REP+
SandKing94 is offline   Reply With Quote
Old 22/05/2015, 08:53 AM   #4
Smileys
Huge Clucker
 
Smileys's Avatar
 
Join Date: Dec 2013
Location: Home.
Posts: 385
Reputation: 31
Default Re: (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version f

Also, why do you put integers between quotes('%d')?

just put them as %d.

ONLY put strings between single quotes, like: '%s'
Smileys is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synta Banditukas Scripting Help 1 12/01/2015 05:59 PM
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synta Banditukas Scripting Help 1 20/12/2014 08:34 AM
Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th audriuxxx Scripting Help 4 11/04/2014 06:42 PM
MySQL error 1064 - error in SQL syntax Bu$ter Scripting Help 2 23/05/2013 10:22 AM
An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds.... rati555 Scripting Help 1 14/09/2012 07:45 PM


All times are GMT. The time now is 06:21 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.