Error No: 1064 - MySQL error 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 'AS cid ) AS total FROM vtx_editor_texto t1 INNER JOIN vtx_editor_reporter AS t2' at line 1
Query:
SELECT SQL_CACHE COUNT( DISTINCT t1.colunista AS cid ) AS total FROM vtx_editor_texto t1 INNER JOIN vtx_editor_reporter AS t2 ON t1.colunista = t2.id and t1.id = (SELECT MAX(id) FROM vtx_editor_texto WHERE colunista = t2.id) WHERE t2.perfil='1' ;SELECT SQL_CACHE t1.colunista AS cid,t1.titulo AS titulo,t1.id AS mid,t1.publicado AS publicado,t2.nome AS nome,t1.resumo AS resumo,t2.foto AS foto FROM vtx_editor_texto t1 INNER JOIN vtx_editor_reporter AS t2 ON t1.colunista = t2.id and t1.id = (SELECT MAX(id) FROM vtx_editor_texto WHERE colunista = t2.id) WHERE t2.perfil='1' ORDER BY t2.nome ASC LIMIT 0,15
Ministério Batista do Calvário - Nossos Colunistas