Welcome to Geeklog, Anonymous Friday, October 18 2024 @ 01:54 am EDT

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
 Quote

All times are EDT. The time is now 01:54 am.

  • 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