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 'ORDER BY t.orden ASC' at line 3
SELECT t.id,t.nombre,t.orden,t.id_categoria_padre FROM categorias AS t WHERE 1 AND t.id_categoria_padre= ORDER BY t.orden ASC