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 'amour(^| |$|[,])' OR keywords REGEXP '(^| |$|[,])pour(^| |$|[,])' OR keywords ' at line 1 SELECT id, idEvent FROM events_items WHERE active=1 AND (keywords REGEXP '(^| |$|[,])l'amour(^| |$|[,])' OR keywords REGEXP '(^| |$|[,])pour(^| |$|[,])' OR keywords REGEXP '(^| |$|[,])tous(^| |$|[,])' OR keywords REGEXP '(^| |$|[,])m6(^| |$|[,])' OR keywords REGEXP '(^| |$|[,])moches(^| |$|[,])') AND dateStart > 1338382833 ORDER BY events_items.dateStart