[eluser]Unknown[/eluser]
i am trying to call a view in my index page's view
i am getting this error "Call to undefined method CI_Loader::eiview() in "
Code:
//code for contoller
public function Events()
{
parent::__construct();
$this->load->model('EventData');
$this->load->eiview();
$this->load->posevents();
}
public function eiview()
{
$this->load->helper('url');
$this->load->library('pagination');
$confige['base_url'] = base_url() .'index.php/events/eiview';
$confige['total_rows'] = $this->db->count_all('events');
$confige['per_page'] = '5';
$confige['full_tag_open'] = '<p>';
$confige['full_tag_close'] = '</p>';
$this->pagination->initialize($confige);
$this->load->model('eventdata');
$events=array();
$events['eventi']=$this->eventdata->viewevents($confige['per_page'],$this->uri->segment(3));
$this->load->library('pagination');
$this->load->view('eventinvites',$events);
}
public function posevents()
{
$this->load->helper('url');
$this->load->library('pagination');
$config['base_url']=base_url().'index.php/events/postedevents';
$config['per_page']=5;
$config['full_tag_open']='<p>';
$config['full_tag_close']='</p>';
$this->pagination->initialize($config);
$this->load->model('EventData');
$pevents=array();
$pevents['eventp']=$this->eventdata->postevent($config['per_page'],$this->uri->segment(3));
$this->load->view('postedevent',$pevents);
}
Code:
function viewevents($num, $offset)
{
$this->load->helper('date');
$dt=now();
$this->db->select('EventTitle,EventDescription,Category,EventType,StartDate,Place,Venue,Address,City,State,Country,PostalCode');
$this->db->order_by('StartDate',now());
$sql=$this->db->get('events',$num, $offset);
$this->db->limit(5);
if($sql->num_rows()>0)
{
foreach($sql->result() as $etdata)
{
$eventdata[]=$etdata;
}
return $eventdata;
}
else
{
return false;
}
}
function postevent($pnum,$poffset)
{
$this->db->select('EventTitle,EventDescription,Category,EventType,StartDate,Place,Venue,Address,City,State,Country,PostalCode');
$this->db->where('User_IdUser',2);
$psql=$this->db->get('Events',$pnum,$poffset);
$trow=$psql->num_rows();
$config['total_rows']=$trow;
if($psql->num_rows()>0)
{
foreach($psql->result() as $pedata)
{
$postdata[]=$pedata;
}
return $postdata;
}
else
{
return false;
}
}
why this error appears?
when i investigated about that error i found this article
http://codeigniter.com/wiki/Modular_Exte...and_errors
but i didnt get much about error. can anybody help me to understand this?