Posts: 737
Threads: 338
Joined: Jan 2013
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?
Posts: 1,099
Threads: 79
Joined: Nov 2011
Reputation:
0
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?
Posts: 1,938
Threads: 16
Joined: Feb 2007
Reputation:
0
The error message is cut off. The real query is shown after it and you can guess based on that query.
Posts: 166
Threads: 0
Joined: Feb 2013
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.
Posts: 737
Threads: 338
Joined: Jan 2013
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