Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't use an apostrophe in Search Box


clc701

Recommended Posts

When a user does a search and uses an apostrophe in the word the site reports this error

 

1064 - 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 's Go%' or pd.products_name like '%Let's Go%' ) and p.products_status = 1 and pd.' at line 1

 

select p.products_id from products p left join products_description pd on p.products_id = pd.products_id where ( pd.products_head_keywords_tag like '%Let's Go%' or pd.products_name like '%Let's Go%' ) and p.products_status = 1 and pd.language_id = 1 limit 1

 

Does anyone know how to fix this?

Link to comment
Share on other sites

Yes, I get the error at your site, so I wonder if it is because you are running a very old osCommerce version?

 

I just tried it on a 2.2rc2a from 2008, and the search on that works fine with an apostrophe.

 

Therefore, it must be something you have done at some point in the past to affect the way that the search is handled.

Do you remember making any chages that could have affected?

 

 

.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...