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 'and t.can_codigo= and t.txt_subite = 0
order by c.cat_ordcat, c' at line 6
select c.cat_codigo,cat_nomcat,txt_tiptxt,txt_novjan,txt_urltxt,txt_codigo,txt_descri
from categoria AS c
left join cat_texto AS t on t.cat_codigo = c.cat_codigo
WHERE c.cat_status = 'Aprovado'
AND t.txt_status = 'Aprovado'
AND c.can_codigo= AND t.can_codigo= AND t.txt_subite = 0
ORDER BY c.cat_ordcat, c.cat_codigo, t.txt_ordtxt