Fatal error: Uncaught Exception: 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 'and begin_year >= 2007 and end_year <= 2013 ) or 0 ) order by rand() lim' at line 5<br />Error No: 1064<br />
select p.product_id from oc_product_to_ymm ymm
join oc_product p on p.product_id = ymm.product_id
where auto_relate and p.product_id <> 3310125
and
(( make_id = 20 and model_id = and begin_year >= 2007 and end_year <= 2013 ) or 0 ) order by rand() limit 20 in /home/madnessnew/public_html/system/library/db/mysqli.php:40
Stack trace:
#0 /home/madnessnew/public_html/system/library/db.php(45): DB\MySQLi->query('\n ...')
#1 /home/madnessnew/public_html/catalog/model/catalog/product.php(500): DB->query('\n ...')
#2 /home/madnessnew/public_html/catalog/model/catalog/product.php(519): ModelCatalogProduct->getAutoRelated in /home/madnessnew/public_html/system/library/db/mysqli.php on line 40