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 'colored(^| |$|[,])') AND dateStart > 1338392494 ORDER BY events_items.dateStart' at line 1 SELECT id, idEvent FROM events_items WHERE active=1 AND (keywords REGEXP '(^| |$|[,])meltones(^| |$|[,])' OR keywords REGEXP '(^| |$|[,])nearly'colored(^| |$|[,])') AND dateStart > 1338392494 ORDER BY events_items.dateStart