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 tbl_product.status=1 order by IF( product_photo_small_url != '' AND produc' at line 1
select count(*) as total_count from tbl_product, tbl_product_category where tbl_product_category.product_category_id=tbl_product.product_product_category_id and tbl_product.product_product_category_id in() and tbl_product.status=1 order by IF( product_photo_small_url != '' AND product_photo_small_url NOT LIKE '%images/icons/%' and product_photo_small_url NOT LIKE '%admin/images/%', 1, 0 ) DESC ,product_member_type desc,product_viewed_count desc,product_comments_count desc, product_name asc
select count(*) as total_count from tbl_product, tbl_product_category where tbl_product_category.product_category_id=tbl_product.product_product_category_id and tbl_product.product_product_category_id in() and tbl_product.status=1 order by IF( product_photo_small_url != '' AND product_photo_small_url NOT LIKE '%images/icons/%' and product_photo_small_url NOT LIKE '%admin/images/%', 1, 0 ) DESC ,product_member_type desc,product_viewed_count desc,product_comments_count desc, product_name asc