Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's Top-Rated Spanish School in San Juan del Sur, Nicaragua!'' at line 1 SQL; SELECT id FROM `blog_posts` WHERE datetime LIKE '2016-01-28%' AND title ='Trip Advisor's Top-Rated Spanish School in San Juan del Sur, Nicaragua!'