SA-MP Forums Archive
Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th - 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 queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th (/showthread.php?tid=499270)



Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th - audriuxxx - 07.03.2014

Hi,

Code:
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
I want to ask. It'is possible to know in what querie is that problem? because i have hundred of different queries, and it'is impossible to check everything, or it's take a very a lot of time. I mean i want to print, in mysql.log how i wrote it'is can?


Re: Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version fo - Tamer - 07.03.2014

Hmm, you may re-define your mysql_query() function with a macro and make query string print that is sent. Then you may check out when did you get the error from the mysql_log and then check the same time from the server_log.txt and find which query has an issue.

But as far as I know it should write after the error message on mysql_log, which plugin version are you on?


Re: Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version fo - mamorunl - 07.03.2014

The error message is cut off. The real query is shown after it and you can guess based on that query.


Re: Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version fo - ColeMiner - 07.03.2014

Generally people write a piece of code then test it, so the problem os in the small area you just wrote and are currently testing.


Re: Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version fo - audriuxxx - 11.04.2014

There is a lot of ways, maybe if you test in one way it will be okay, but can happin some ways, and there can be wrong, and when you are doing this a lot of, creating a lof of queries, when gamemodeinit, when player write commands, loading from database, where name='%s', player writed test and so on... And it's really to be good, if i get error in mysql.log to know in what querie was syntax error