The query (SELECT CONCAT_WS('/', 'nota', id_noticia, slug) AS link FROM noticias WHERE id_noticia = ) produced an error (42000): 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.