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 's dog' OR `keyword2` LIKE 'jenny's dog' OR `keyword3` LIKE 'jenny's dog' OR `key' at line 1 - SELECT * FROM `sab_posts` WHERE `datetime` < NOW() AND ( `keyword1` LIKE 'jenny's dog' OR `keyword2` LIKE 'jenny's dog' OR `keyword3` LIKE 'jenny's dog' OR `keyword4` LIKE 'jenny's dog' OR `keyword5` LIKE 'jenny's dog' OR `keyword6` LIKE 'jenny's dog' OR `keyword7` LIKE 'jenny's dog' OR `keyword8` LIKE 'jenny's dog' OR `keyword9` LIKE 'jenny's dog' OR `keyword10` LIKE 'jenny's dog' ) ORDER BY `datetime` DESC LIMIT 0 , 10