Author Topic: Problem with search module  (Read 847 times)

lostmail

  • Jr. Member
  • **
  • Posts: 199
Problem with search module
« on: November 13, 2016, 09:39:06 am »
Just see here:
I have a product with title: Halterahmen Spiegelglas "Trapezspiegel"
When i search for Trapezspiegel i get a seacht result and when i click the result link i get this error message:

Quote
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 'Trapezspiegel"" ORDER BY product_name DESC, `virtuemart_product_id` DESC LIMIT ' at line 1 SQL=SELECT p.`virtuemart_product_id`, `l`.`product_name`,`l`.product_name FROM `#__virtuemart_products` as p INNER JOIN `#__virtuemart_products_de_de` as l using (`virtuemart_product_id`) LEFT JOIN `#__virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `#__virtuemart_product_categories` as pc ON p.`virtuemart_product_id` = `pc`.`virtuemart_product_id` WHERE ( `pc`.`virtuemart_category_id` = 10 AND ( `ps`.`virtuemart_shoppergroup_id`= "1" OR `ps`.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`="1" ) AND p.`virtuemart_product_id`!="374" AND `l`.product_name <= "Halterahmen Spiegelglas "Trapezspiegel"" ORDER BY product_name DESC, `virtuemart_product_id` DESC LIMIT 1

It`s always a problem when i use " in Title of products.
Joomla 3.x + VM 3.0.16

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3040
  • using Piwik instead of Google Analytics
Re: Problem with search module
« Reply #1 on: November 22, 2016, 00:07:12 am »
You can try one or two single quotes (einfaches Anf├╝hrungszeichen) instead of the double quotes or the html entity for double quote (&quot;). If that doesn't work I would suggest to use
Halterahmen Spiegelglas - Trapezspiegel.
Please let the VirtueMart developers know which PHP version you are using for VirtueMart here:
http://forum.virtuemart.net/index.php?topic=133216.0