- 07 Fev 2013, 12:04
#35023
Galera boa tarde.
Estou precisando de ajuda.
Quando vou em algum produto e altero na url para um ID não existente ou para aspas " , aparece um erro de SQL.
Contudo, instalei o Opencart novamente para rodar local e fiz o teste e não aparece o erro de SQL.
Estou preocupado pois instalei alguns poucos módulos em minha loja e talvez possa ter dado algum problema(alteração)
segue abaixo o erro de sql:
Notice: Error: 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 ')) ORDER BY p.price ASC LIMIT 1 ' at line 3
Error No: 1064
( SELECT 'min' AS title, p.price, p.tax_class_id FROM product p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) ORDER BY p.price ASC LIMIT 1 )UNION( SELECT 'min_special' AS title, p.price, 0 as tax_class_id FROM product_special p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) AND ((p.date_start = '0000-00-00' OR p.date_start < NOW()) AND (p.date_end = '0000-00-00' OR p.date_end > NOW())) ORDER BY p.priority ASC, p.price ASC LIMIT 1 )UNION( SELECT 'max' AS title, p.price, p.tax_class_id FROM product p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) ORDER BY p.price DESC LIMIT 1 )UNION( SELECT 'max_special' AS title, p.price, 0 as tax_class_id FROM product_special p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) AND ((p.date_start = '0000-00-00' OR p.date_start < NOW()) AND (p.date_end = '0000-00-00' OR p.date_end > NOW())) ORDER BY p.priority ASC, p.price DESC LIMIT 1 ) in /home2/swsinfb1/public_html/home/loja/system/database/mysql.php on line 49
Valeu aí.
Estou precisando de ajuda.
Quando vou em algum produto e altero na url para um ID não existente ou para aspas " , aparece um erro de SQL.
Contudo, instalei o Opencart novamente para rodar local e fiz o teste e não aparece o erro de SQL.
Estou preocupado pois instalei alguns poucos módulos em minha loja e talvez possa ter dado algum problema(alteração)
segue abaixo o erro de sql:
Notice: Error: 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 ')) ORDER BY p.price ASC LIMIT 1 ' at line 3
Error No: 1064
( SELECT 'min' AS title, p.price, p.tax_class_id FROM product p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) ORDER BY p.price ASC LIMIT 1 )UNION( SELECT 'min_special' AS title, p.price, 0 as tax_class_id FROM product_special p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) AND ((p.date_start = '0000-00-00' OR p.date_start < NOW()) AND (p.date_end = '0000-00-00' OR p.date_end > NOW())) ORDER BY p.priority ASC, p.price ASC LIMIT 1 )UNION( SELECT 'max' AS title, p.price, p.tax_class_id FROM product p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) ORDER BY p.price DESC LIMIT 1 )UNION( SELECT 'max_special' AS title, p.price, 0 as tax_class_id FROM product_special p WHERE p.price>0 AND p.product_id in (select pc.product_id FROM product_to_category pc WHERE pc.category_id IN()) AND ((p.date_start = '0000-00-00' OR p.date_start < NOW()) AND (p.date_end = '0000-00-00' OR p.date_end > NOW())) ORDER BY p.priority ASC, p.price DESC LIMIT 1 ) in /home2/swsinfb1/public_html/home/loja/system/database/mysql.php on line 49
Valeu aí.

