-2

,Message: Call to a member function get_paged_list() on null Filename: controllers/siswa.php this my full code http://pastebin.com/ZBHkBS8i

Problem solved,thanks to baci and bora

1 Answers1

0

you shouldn't call the model like this

$siswas = $this->siswa_model->
get_paged_list($this->limit,$offset,$order_column,$order_type) ->result();

but like this

$this->load->model("siswa_model");
$result = $this->siswa_model->
get_paged_list($this->limit,$offset,$order_column,$order_type)

and in the model you should query the database end return the result, something like this

public function get_paged_list($limit,$order_column,$order_type)
{
$q_str = "select * from table ....etc ";
$q = $this->db->query($q_str);
return $q->result();
}

hope that helps

Nassim
  • 2,879
  • 2
  • 37
  • 39
  • sory baci yesterday i have holiday, i try your sugestion,but i find error like this An Error Was Encountered Unable to locate the model you have specified: Siswa_model whats wrong now?thanks before – maske sanjaya Jul 06 '15 at 14:06
  • now you must check your model if it is in the right place and with the right name see http://stackoverflow.com/questions/8074368/codeigniter-php-model-access-unable-to-locate-the-model-you-have-specified – Nassim Jul 06 '15 at 14:14
  • thanks,the file name must same as my model,i now understood,thanks baci :-) , problem solved – maske sanjaya Jul 06 '15 at 14:41
  • sure, but i will add some question in next time :-) – maske sanjaya Jul 06 '15 at 14:54
  • this the error : Message: Call to a member function save() on null – maske sanjaya Jul 06 '15 at 16:50