SQL error: SELECT c.*, c.title, c.content, c.link, cc.id as childs FROM contents c LEFT JOIN contents cc ON (cc.parent=c.id AND cc.deleted=0) WHERE c.id = 1