When we keep another attribute with input type price for having range filter along with price range filter, and apply both filters together then fatal error comes because wrong sql query is generated. The query is something like "... where AND ...". As AND comes after where, fatal error is thrown. Any suggestions or update for this?
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 (capacityrange_idx.value >= 200) AND (capacityrange_idx.value < 300) AND (pr' at line 5, query
was:
SELECT COUNT(DISTINCT e.entity_id), ROUND(MAX(price_index.min_price ) 1, 2) AS max, ROUND(MIN
(price_index.min_price ) 1, 2) AS min, STDDEV_SAMP(ROUND((price_index.min_price ) * 1, 2)) AS std FROM catalog_product_entity AS e
INNER JOIN catalog_category_product_index AS cat_index ON cat_index.product_id=e.entity_id AND cat_index
.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '3'
INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND
price_index.website_id = '1' AND price_index.customer_group_id = 0
LEFT JOIN cataloginventory_stock_status AS stock_status ON e.entity_id = stock_status.product_id
AND stock_status.website_id=1
INNER JOIN catalog_product_index_eav_decimal AS capacityrange_idx ON capacityrange_idx.entity_id
= e.entity_id AND capacityrange_idx.attribute_id = '804' AND capacityrange_idx.store_id = 1 WHERE AND
(capacityrange_idx.value >= 200) AND (capacityrange_idx.value < 300) AND (price_index.min_price IS NOT
NULL)
When we keep another attribute with input type price for having range filter along with price range filter, and apply both filters together then fatal error comes because wrong sql query is generated. The query is something like "... where AND ...". As AND comes after where, fatal error is thrown. Any suggestions or update for this?
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 (capacityrange_idx.value >= 200) AND (capacityrange_idx.value < 300) AND (pr' at line 5, query was:
SELECT COUNT(DISTINCT e.entity_id), ROUND(MAX(price_index.min_price ) 1, 2) AS
max
, ROUND(MIN (price_index.min_price ) 1, 2) ASmin
, STDDEV_SAMP(ROUND((price_index.min_price ) * 1, 2)) ASstd
FROMcatalog_product_entity
ASe
INNER JOINcatalog_category_product_index
AScat_index
ON cat_index.product_id=e.entity_id AND cat_index .store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '3' INNER JOINcatalog_product_index_price
ASprice_index
ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 LEFT JOINcataloginventory_stock_status
ASstock_status
ON e.entity_id = stock_status.product_id AND stock_status.website_id=1 INNER JOINcatalog_product_index_eav_decimal
AScapacityrange_idx
ON capacityrange_idx.entity_id = e.entity_id AND capacityrange_idx.attribute_id = '804' AND capacityrange_idx.store_id = 1 WHERE AND (capacityrange_idx.value >= 200) AND (capacityrange_idx.value < 300) AND (price_index.min_price IS NOT NULL)