RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 4165 | Replies: 1 | Thread Tools  Display Modes
Join Date: Oct 2005
Posts: 13
Reputation: iketunde is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
iketunde iketunde is offline Offline
Newbie Poster

autogenerated mysql query with javascript

  #1  
Oct 18th, 2005
Hello,

I created this page. it contains textareas and checkboxes. when user enters information or check any of the checkboxes. this translates to a conditioned query.i achieve this using javascript. u can find the url @

www.laterallinks.com\search.htm

try entering gibberish and any of the fields and click on the fetch applicants button.

it should check the database for possible qualified entries.

I test this on my local pc at home. it works very fine. on my local machine it executes fine

for example on my local pc if i enter washington high in the secondary school textarea this is what i get

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

but when i upload it to my webhost machine. it introduces extra slashes as shown below.
how do i stop this from happening.


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 '\\\'%washington high%\\\') LIMIT 0, 1' at line 1

SELECT * FROM Applicants WHERE (secSchName like \\\'%washington high%\\\') LIMIT 0, 1
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:35 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC