[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 1]: SELECT n.content, n.summary, n.mainImage, n.secondImage, n.title, c.nombre, concat(day(n.creationDate),"/",month(n.creationDate),"/",year(n.creationDate)) as fecha FROM noticia n INNER JOIN ciudad c ON n.idCategory = c.id WHERE (0= 1 or n.showContent=1) and n.id =