Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Search is replacing characters


md1

Recommended Posts

Hi,

 

My Search and Advanced search has stopped working. I am not sure when it started but I have not made any modifications for a while. What appears to be happening if that ' are being replaced by \' but I cannot see how or why. I have copied back backup copies of advanced_search and advanced_search_results but the problem still exists.

 

This is the error message:-

 

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 'select distinct p.products_image, p.products_quantity, m.manuf

 

select count(select distinct p.products_image, p.products_quantity, m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where p.products_status = \'1\' and p.products_id = pd.products_id and pd.language_id = \'1\' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like \'%\\\"macaulay%\' or p.products_model like \'%\\\"macaulay%\' or m.manufacturers_name like \'%\\\"macaulay%\' or pd.products_description like \'%\\\"macaulay%\') and (pd.products_name like \'%culkin\\\"%\' or p.products_model like \'%culkin\\\"%\' or m.manufacturers_name like \'%culkin\\\"%\' or pd.products_description like \'%culkin\\\"%\') ) order by pd.products_name) as total

 

It seems to me that \'s have been inserted.

 

Regards

Mark

Link to comment
Share on other sites

  • 3 weeks later...

Perhaps something has changed with your server's settings for magic_quotes_gpc, magic_quotes_runtime, and/or magic_quotes_sybase. You can check this using phpinfo(). OSC MS2 assumes gpc is on, runtime is off, and sybase is off; if you have other settings, you'll get various errors involving slashes and apostrophes. My hosting provider can change these settings on a per-domain basis, so if that's the problem, perhaps your provider can solve it for you easily.

 

Hope this helps.

 

Regards,

 

--Grayson

Grayson Morris

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...