this is the model function i am trying join the single database table it self the , parent::get method fetch the data from the table !
public function get_with_parents($id=NULL,$single=FALSE){
$this->db->select('pages.*','p.slug as parent_slug','p.title as parent_title');
$this->db->join('pages as p','pages.parent_id=p.id','left');
return parent::get($id,$single);
}
this is the controller!!
$this->data ['pages'] = $this->Page_model->get_with_parents();