Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 11:45 pm EST
Geeklog Forums
1064 SQL Error in search including a single quote
Alain
Anonymous
Is there a way to avoid the \"1064: You have an error in your SQL syntax near \'\' at line 1\" error message, when the user enter a search string containing a single quote in it.
Just stripping the quote doesn\'t work. It gives false results.
Curiously, I have GL 1.3.8 installed on 2 different sites. On the one with PHP 4.2.3 and MySQL Client API 3.23.51 I get the error.
But on another site (used for tests only) with PHP 4.3.2 and MySQL Client API 4.0.15 It works fine. The only problem is that the returned search string at the top of the results page has a back-slash before the quote. That would be easier to fix.
Thanks
Alain
11
9
Quote
All times are EST. The time is now 11:45 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content