SELECT count(distinct cle4) FROM zserenov WHERE REGEXP '[[:<:]]Vinaigre[[:>:]]' AND (prix>=1) AND cle1 REGEXP '[[:<:]]CONDIMENTS[[:>:]]' 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 'REGEXP '[[:<:]]Vinaigre[[:>:]]' AND (prix>=1) AND cle1 REGEXP '[[:<:]]CONDIMENTS' at line 1