ERROR IN QUERY: SELECT COUNT(*) AS `num` FROM `products` WHERE `id_constructor` = AND `product_type` = 'mobiles-photos' => 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 `product_type` = 'mobiles-photos'' at line 1ERROR IN QUERY: SELECT * FROM `products` WHERE `id_constructor` = AND `product_type` = 'mobiles-photos' ORDER BY model ASC => 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 `product_type` = 'mobiles-photos' ORDER BY model ASC' at line 1