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 Bed - Breakfast Inn' or url='/inn/Carole's Bed - Breakfast Inn' or url='/inn/C' at line 1 (#1064) SELECT * FROM meta WHERE url='/inn/Carole's Bed - Breakfast Inn' or url='/inn/Carole's Bed - Breakfast Inn' or url='/inn/Carole's Bed Breakfast Inn' or url='/inn/Carole's-Bed---Breakfast-Inn' or REPLACE(url, '.', '')='/inn/Carole's Bed - Breakfast Inn'