Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: PokémonS - toukokuu 31, 2011, 07:34:51 AP

Otsikko: "You have an error in your SQL syntax"
Kirjoitti: PokémonS - toukokuu 31, 2011, 07:34:51 AP
Hi,

I got an unusual error in my SMF 1.1.13. When I posting with a "Quick Reply" feature, I got a "Connection has timed out" in my Firefox. Then I push enter the .../index.php?action=post2;. Then I got this messages:

LainaaDatabase 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 '' at line 1
File: /home/pokemons/public_html/forum/Sources/Post.php
Line: 1353

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.13, while your database is at version 1.1.11. The above error might possibly go away if you execute the latest version of upgrade.php.

Then, I entered the index forum. It's still normally viewed by me and my visitors. But I want to know, what's the problem?

Pls reply thanks..
Otsikko: Re: "You have an error in your SQL syntax"
Kirjoitti: Angelina Belle - kesäkuu 14, 2011, 09:27:20 AP
You may wish to place your forum in maintenance mode, and then to turn on SQL debugging to find out what the bad SQL statement is.


For more on how to do this, please see
http://wiki.simplemachines.org/smf/Settings.php#.24db_show_debug
Otsikko: Re: "You have an error in your SQL syntax"
Kirjoitti: Kratty256 - kesäkuu 14, 2011, 12:50:55 IP
According to the message, your database is outdated. It might be best if you upgraded to 1.1.14

Upgrading SMF (http://docs.simplemachines.org/index.php?board=3.0;sort=subject)

Also, do you have any modifications installed that might modify Post.php?
Otsikko: Re: "You have an error in your SQL syntax"
Kirjoitti: Aleksi "Lex" Kilpinen - kesäkuu 26, 2011, 04:23:22 AP
Usually the best place to start is the actual error, and not the DB version message. So I would follow AngelinaBelle's advice there first...