Parse error: syntax error, unexpected '(', expecting identifier
(T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\wamp\www\ghostwriter\application\models\addproject_m.php on line 117
I am trying to create a pagination for my page, so i created a function to fetch the counts of the projects.
function get_projects_count(){
$this->db->select->('p_id')->from('ghost_projects');
$query=$this->db->get();
return $query->num_rows();
}
The above code is in the model.
$this->data['projects'] = $this->addproject_m->ongoingprojects(5,$start);
$this->load->library('pagination');
$config['base_url'] = base_url().'project/search';
$config['total_rows'] = $this->addproject_m->get_projects_count();
$config['per_page'] = 5;
$this->pagination->initialize($config);
$data['pages']=$this->pagination->create_links();
And the above code is from the controller.
Can somebody please help me on this erro i am facing (new to codeigniter).