You have an error in your SQL syntax near 'OR `id_types`='0')) OR ((`clients_id`='0' OR `clients_id`='-1') AND `produc' at line 6SELECT * FROM `products_prices` WHERE `date_deb`<='2012-02-06' AND `date_fin`>='2012-02-06' AND `categories_tarifs_id`='1' AND ((`clients_id`='' AND (`products_price`!=0 OR `montant_promo`!='0') AND (`products_id`='150' OR OR `id_types`='0')) OR ((`clients_id`='0' OR `clients_id`='-1') AND `products_id`='150' AND `montant_promo`!='0' AND `id_categorie`='0' AND `id_types`='0' AND `area_id`='0' AND `categories_tarifs_id`='1') OR (`clients_id`='0' AND AND `id_types`='0' AND `montant_promo`!='0' AND `products_price`='0' AND `products_id`='0') OR (`clients_id`='0' AND `id_types`='0' AND `id_categorie`='0' AND `montant_promo`!='0' AND `products_price`='0' AND `products_id`='0') OR (`products_id`='150' AND `products_price`!='0' AND `area_id`='0' AND `qte_deb`<='1' AND `qte_fin`>='1') OR (`products_id`='150' AND `products_price`!='0' AND `montant_promo`='0' AND `id_categorie`='0' AND `id_types`='0' AND `qte_deb`='0' AND (`qte_fin`='0' OR `qte_fin`='999999999')) ) ORDER BY `id_categorie` DESC, `id_types` DESC