Error in query: SELECT * FROM books WHERE (Author = 'Robert G. O'Meally' OR Author LIKE 'Robert G. O'Meally%' OR Author LIKE '%Robert G. O'Meally' OR Author LIKE '%Robert G. O'Meally%') AND DISPLAY = 1 ORDER BY Title. 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 'Meally' OR Author LIKE 'Robert G. O'Meally%' OR Author LIKE '%Robert G. O'Meall' at line 1