got another problem.

I have an interface that uses javascript to generate the Mysql WHERE condition of a query it posts to the a PHP page that retrieves values from the database. it works fine as usual on my local pc. but i when i uploaded it to my web host machine. it gave the 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 '\\\'%government college%\\\') LIMIT 0, 1' at line 1
SELECT * FROM Applicants WHERE (secSchName like \\\'%government college%\\\') LIMIT 0, 1

on my local pc the code appears as :

SELECT * FROM Applicants WHERE (secSchName like \\\'%government college%\\\') LIMIT 0, 1

i can see the error is from the \\\ but how do i correct it since i didnt put there in the first place.

11 Years
Discussion Span
Last Post by wally_lawless

What is the SQL query in the code that is on your local PC? Are you using some sort of design tool to build your app? More code from where your generating this query would be helpful.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.