select distinct c.*,
sc.meta_titolo, sc.meta_descrizione, sc.meta_key, sc.url, sc.url_canonical, sc.url_alternate
from categorie as c left join seo_categorie as sc on c.id=sc.fk_categoria where c.id = : 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 '' at line 3