Error in query: SELECT * FROM books WHERE (Author = 'Gillen D'Arcy Wood' OR Author LIKE 'Gillen D'Arcy Wood%' OR Author LIKE '%Gillen D'Arcy Wood' OR Author LIKE '%Gillen D'Arcy Wood%') 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 'Arcy Wood' OR Author LIKE 'Gillen D'Arcy Wood%' OR Author LIKE '%Gillen D'Arcy ' at line 1