[eluser]kjackson7_93[/eluser]
Thanks a ton! It was the get() without passing a database that I was stumped on... this is how I used it in my application:
Code:
function getNotes($offset=0,$row_count=$this->default_page_count){
$this->db->select("SQL_CALC_FOUND_ROWS board_notes.*");
$this->db->orderby('board_notes.created', 'desc');
$this->db->limit($row_count,$offset);
$board_notes = $this->db->get('board_notes');
$this->db->select("FOUND_ROWS() as PostNum");
$rRes2 = $this->db->get();
$iPostNum = $rRes2->row_array();
$this->_setFoundRows($iPostNum['PostNum']);
return $board_notes->result();
}
function _setFoundRows($found_rows){
$this->FoundRows = $found_rows;
}
function getFoundRows(){
return $this->FoundRows;
}
Then in my controller:
Code:
$notes['offset'] = (int) $this->uri->segment(3, 0);
$notes['notes_list'] = $this->Notes_model->getNotes($notes['offset'], $paging['per_page']);
$notes['found_rows'] = $this->Notes_model->getFoundRows();
Thanks again!