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 'Auberge Carmel, Relais - Chateaux' or url='/inn/L'Auberge Carmel, Relais - Chate' at line 1 (#1064) SELECT * FROM meta WHERE url='/inn/L'Auberge Carmel, Relais - Chateaux' or url='/inn/L'Auberge Carmel, Relais - Chateaux' or url='/inn/L'Auberge Carmel, Relais Chateaux' or url='/inn/L'Auberge-Carmel,-Relais---Chateaux' or REPLACE(url, '.', '')='/inn/L'Auberge Carmel, Relais - Chateaux'