FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


SQL ERROR [ mysqli ]





Blazole
i have the following error on my forum at http://laurawhitefans.co.uk/forum/

Code:
General Error
SQL ERROR [ mysqli ]

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 ') ) AND t.forum_id = 0 ORDER BY t.topic_last_post_time DESC LIMIT 1' at line 5 [1064]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.


please can somebody help me fix this error. its really stressing me out lol
jmraker
You will need to open the source of the page and search for
') ) AND t.forum_id = 0 ORDER BY t.topic_last_post_time DESC LIMIT 1
If you don't find it, search for smaller parts like "ORDER BY t.topic_last_post_time DESC"
It seems to be on line 5.

If that doesn't work, look in the included files

Once you find the mysql_query line that runs the faulty sql statement you can figure out why the )) in the query is wrong and post the whole query here if you can't figure it out.

Each ')' needs to have a corresponding '(' before it in the query as in ((1+1)*2)+(2*2) where if you take away any '(' there's an extra ')' that it doesn't expect to be there.

-----------
Edit: The error message is gone and the forum a forum is showing so they resolved the problem.
Related topics
Help: SQL error after uploading new files(thread updated)
Forum error when posting
Error Posting...
Sql Error: 1017. Missing all the indexes files of phpbb
SQL error notification in my forum
SQL error
SQL error on my site
[man] SQL Error : 1054 Unknown column \'session_admin\ en DB
SQL error
SQL ERROR [ mysql4 ] - due to hosting? -
SQL error
[SQL] Error in SQL Code
Strange SQL error
Problems with Mysql
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.