SA-MP Forums Archive
Error in mysql_query: You have an error in your SQL syntax; - 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: Error in mysql_query: You have an error in your SQL syntax; (/showthread.php?tid=652457)



Error in mysql_query: You have an error in your SQL syntax; - zenakung - 11.04.2018

# I'm not good at English

How can I fix it?





Code:
[01:31:40] Error in mysql_query: 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 \'Char=292,ContractTime=0,DetSkill=0,SexSkill=0,BoxSkill=0,LawSkill=0,MechSkill=0,\' at line 1
[01:31:45] Error in mysql_query: 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 \'Char=292,ContractTime=0,DetSkill=0,SexSkill=0,BoxSkill=0,LawSkill=0,MechSkill=0,\' at line 1
[01:32:01] Error in mysql_query: 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 \'Char=292,ContractTime=0,DetSkill=0,SexSkill=0,BoxSkill=0,LawSkill=0,MechSkill=0,\' at line 1
[01:32:17] Error in mysql_query: 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 \'Char=292,ContractTime=0,DetSkill=0,SexSkill=0,BoxSkill=0,LawSkill=0,MechSkill=0,\' at line 1



Re: [HELP !!] Error in mysql_query: You have an error in your SQL syntax; - Jstylezzz - 11.04.2018

Can you post the query code? You might have missed a ` or ' somewhere, or maybe made a different mistake in the syntax somewhere.


Re: [HELP !!] Error in mysql_query: You have an error in your SQL syntax; - zenakung - 11.04.2018

can you check it .

link : Databest
db.rar


Re: [HELP !!] Error in mysql_query: You have an error in your SQL syntax; - [WSF]ThA_Devil - 11.04.2018

Not the database but the query, such as: 'SELECT FROM `TABLE`' / 'UPDATE' or something of sorts in your code.


Re: [HELP !!] Error in mysql_query: You have an error in your SQL syntax; - zenakung - 11.04.2018

Sorry, I do not understand what you say. I need to find out from where.
Do you have an example?


Re: [HELP !!] Error in mysql_query: You have an error in your SQL syntax; - Jstylezzz - 11.04.2018

Quote:
Originally Posted by zenakung
View Post
Sorry, I do not understand what you say. I need to find out from where.
The piece of code that executes the query, the thing that send data to the database. It will probably look a little like this:
Code:
mysql_tquery(handle, "UPDATE `xxx_xx` SET  `xx`='xx' WHERE x='x';", "OnLoaded");