Post by barnone » Tue Jun 27, 2017 5:55 am

I was just browsing the error log in OC, for no particular reason and saw this come up.

OC 1.5.5.1

PHP 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 ''A=0) AND cd.language_id = '1' AND c2s.store_id = '0' AND c.status = '1' GROUP ' at line 1<br />Error No: 1064<br />SELECT MAX(c.category_id) category_id, MAX(cd.name) name, MAX(c.image) image, COUNT(*) total FROM `oc_category` c LEFT JOIN `oc_category_description` cd ON (c.category_id = cd.category_id) LEFT JOIN `oc_category_to_store` c2s ON (c.category_id = c2s.category_id) LEFT JOIN `oc_product_to_category`p2c ON c.category_id = p2c.category_id LEFT JOIN `oc_product` p ON p.product_id = p2c.product_id LEFT JOIN `oc_product_description` pd ON (p.product_id = pd.product_id) LEFT JOIN `oc_product_to_store` p2s ON p.product_id = p2s.product_id WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND pd.language_id = '1' AND p.manufacturer_id IN (9'A=0) AND cd.language_id = '1' AND c2s.store_id = '0' AND c.status = '1' GROUP BY c.category_id HAVING COUNT(*) > 0 ORDER BY LCASE(cd.name) ASC in /home/***/public_html/system/database/mysql.php on line 50

Any thoughts on a fix?

Active Member

Posts

Joined
Wed Dec 26, 2012 11:49 am

Post by MrPhil » Tue Jun 27, 2017 8:55 pm

barnone wrote:
Tue Jun 27, 2017 5:55 am
I was just browsing the error log in OC, for no particular reason and saw this come up.
Well, that'll teach you to browse without a reason! :laugh:
OC 1.5.5.1

Code: Select all

 PHP 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 
''A=0) AND cd.language_id = '1' AND c2s.store_id = '0'  AND c.status = '1' GROUP ' at line 1
Error No: 1064
SELECT MAX(c.category_id) category_id, MAX(cd.name) name, MAX(c.image) image, COUNT(*) total 
FROM `oc_category` c LEFT JOIN `oc_category_description` cd ON (c.category_id = cd.category_id) 
LEFT JOIN `oc_category_to_store` c2s ON (c.category_id = c2s.category_id) 
LEFT JOIN `oc_product_to_category`p2c ON c.category_id = p2c.category_id  
LEFT JOIN `oc_product` p ON p.product_id = p2c.product_id 
LEFT JOIN `oc_product_description` pd ON (p.product_id = pd.product_id) 
LEFT JOIN `oc_product_to_store` p2s ON p.product_id = p2s.product_id 
WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND pd.language_id = '1' AND p.manufacturer_id IN (9'A=0) AND
 cd.language_id = '1' AND c2s.store_id = '0'  AND c.status = '1' 
GROUP BY c.category_id HAVING COUNT(*) > 0  ORDER BY LCASE(cd.name) ASC 
in /home/***/public_html/system/database/mysql.php on line 50
Any thoughts on a fix?
The error is IN (9'A=0)... the "IN" list should be a list of id's. The "9" may well be OK, but where did that 'A=0 come from? Do you have any extensions installed? Any custom code modifications? Any evidence of a hack?

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by barnone » Tue Jun 27, 2017 10:02 pm

Haha yeah I guess I won't check the error logs anymore!

I do have custom themes, and some various custom modules. Don't really think that hacking is an issue. I see no issue in VQ error log.

I happened to notice this error after a theme update. Although, it doesn't mean anything since I've not checked the store error log for a good long time.

Active Member

Posts

Joined
Wed Dec 26, 2012 11:49 am
Who is online

Users browsing this forum: No registered users and 31 guests