Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Empty WHERE in advanced search
 
KelvinB
Jr. Member
 
Total Posts:  1
Joined:  2012-10-03
 

Hello all,

Can anyone point me in the correct direction for why advanced search is generating an empty WHERE clause?

Using the standard Advanced search PHP etc. MYSQL doesn’t like the empty where and it crashes the site.

MYSQL general log looks like this;

INSERT INTO `catalogsearch_result` (SELECT STRAIGHT_JOIN '1', `s`.`product_id`, MATCH (`s`.`data_index`) AGAINST ('' IN BOOLEAN MODEFROM `catalogsearch_fulltext` AS `sINNER JOIN `catalog_product_entity` AS `eON `e`.`entity_id`=`s`.`product_idWHERE () AND `s`.`store_id`='1'ON DUPLICATE KEY UPDATE `relevance`=VALUES(`relevance`)

Magneto SQL log looks like this;

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 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 ') AND `s`.`store_id`='1'ON DUPLICATE KEY UPDATE `relevance`=VALUES(`relevance`' at line 1' in /Users/kelvin/Projects/leacy_classics/lib/Zend/Db/Statement/Pdo.php:234

Regards
Kelvin

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top