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 'alpinisme'' at line 1 select id,idUser,tipo,titol,introduccio,contingut,titolUrl,fecha,id,visitas from madteam_usuaris.usuarisEntradas where public='si' and idUser='4059' and titolUrl='primer-dia-del-curs-d'alpinisme'