MySQL 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 'AS count_item FROM tb_category c WHERE (SELECT COUNT(i.item_id) FROM tb_item i W' at line 1 at /services5/webpages/m/o/moyerjewelers.com/public/shop/inc/item.class.php line 21
Array
(
    [code] => 1064
    [message] => 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 'AS count_item FROM tb_category c WHERE (SELECT COUNT(i.item_id) FROM tb_item i W' at line 1
    [query] => SELECT c.* AS count_item FROM tb_category c WHERE (SELECT COUNT(i.item_id) FROM tb_item i WHERE i.category_id = c.category_id AND (`totalqtyoh` > 0 OR `webitemflag`="C") AND is_deleted = 0 ) > 0 ORDER BY c.description
    [context] => /services5/webpages/m/o/moyerjewelers.com/public/shop/inc/item.class.php line 21
)