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 'and c.parentid=c1.id' at line 1

Halted on error select c.name,c.short, c.parentid,c.keywords,c.type,c1.name as parentname from category c, category c1 where c.id= and c.parentid=c1.id