944,167 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2165
  • PHP RSS
Oct 17th, 2005
0

probelm with autogenerated mysql query

Expand Post »
Hi,

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 webhost 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.
Last edited by iketunde; Oct 17th, 2005 at 10:06 am. Reason: typo error
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iketunde is offline Offline
13 posts
since Oct 2005
Oct 17th, 2005
0

Re: probelm with autogenerated mysql query

Quote ...
SELECT * FROM Applicants WHERE secSchName like '%government college%' LIMIT 0, 1;
Hopefully, it works.
PoA
Reputation Points: 19
Solved Threads: 9
Posting Whiz in Training
PoA is offline Offline
234 posts
since Jul 2004
Oct 17th, 2005
0

Re: probelm with autogenerated mysql query

Is it allow LIMIT 0 in SQL query? This means there will return no result...
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Free CMS
Next Thread in PHP Forum Timeline: autogenerated mysql query with javascript





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC