MySQL Forums
Forum List  »  PHP

Re: You have an error in your SQL syntax; check the manual that corresponds to ypur My SQL CATID='1" at line 1
Posted by: Jonathan Stephens
Date: October 02, 2015 04:52AM

Not meaning to sound harsh, but you're basically asking someone else to debug your entire page, which contains heaps of unrelated PHP and HTML/JS as well as numerous long, dynamically-generated statements all ending in "' WHERE CATID='" . $_SESSION['STDCATID'] . "'".

Don't expect anyone to jump up and volunteer to do this for you, especially given that you provide no clues as to which statement is actually failing.

I will make 2 guesses as to the source of your error, however:

1. Mismatched/unclosed quotation marks.

2. One or more of your variables are not getting set, or are not getting set to the values you think they are.

You've some debugging ahead of you.

To get started, try echoing the assembled statements to the page and examining each of them carefully.

Tip: When a MySQL error message references a statement with "... near '....'", this usually means that the problem occurred just prior to that point in the statement.

Good luck!

Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation
Oracle

Options: ReplyQuote


Subject
Written By
Posted
Re: You have an error in your SQL syntax; check the manual that corresponds to ypur My SQL CATID='1" at line 1
October 02, 2015 04:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.