An Error Was Encountered
Error Number: 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 p.id!=420 order by rand() limit 2' at line 1
select c.type as sub_cat, p.* from products p join category c on p.category_id=c.id where p.enabled=1 and p.sold_out='N' and c.id= and p.id!=420 order by rand() limit 2