| | |
probelm with autogenerated mysql query
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2005
Posts: 13
Reputation:
Solved Threads: 0
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.
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
Is it allow LIMIT 0 in SQL query? This means there will return no result...
Ecommerce-Web-Store.com Building Your e-Business.
![]() |
Similar Threads
- test mysql query for no results (PHP)
- Double MySQL Query (PHP)
- MySQL query's (MySQL)
- Change MySQL Query Timeout Period (MySQL)
- autogenerated mysql query with javascript (PHP)
- problem with autogenerated mysql query (MySQL)
Other Threads in the PHP Forum
- Previous Thread: Free CMS
- Next Thread: Associative Array of States and Countries
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





