SELECT c.nome, c.cod_categoria, s.nome AS nomesub,
s.cod_categoria_sub, s.fraze, s.fundo
FROM categorias c INNER JOIN categorias_sub s USING(cod_categoria)
WHERE s.cod_categoria_sub =
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 4