Welcome Guest, Not a member yet? Register   Sign In
Pagination misses rows! SOLVED!
#2

[eluser]flaky[/eluser]
may I suggest this little change to the model

Code:
function get_records($num = 10, $offset = 0)
    {
            $query = $this->db->limit($num, $offset)->get('AREA_ENSENANZA_NOMBRADO');
            if($query->num_rows()>0)
            {
                foreach ($query->result() as $row):
                    $data['records'][] = $row;
                endforeach;
                $data['total_rows'] = $query->num_rows();
            }else
            {
                $data['total_rows'] = 0;
            }
    }


Messages In This Thread
Pagination misses rows! SOLVED! - by El Forum - 01-22-2010, 11:08 PM
Pagination misses rows! SOLVED! - by El Forum - 01-23-2010, 01:16 AM
Pagination misses rows! SOLVED! - by El Forum - 01-23-2010, 09:39 AM
Pagination misses rows! SOLVED! - by El Forum - 01-23-2010, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB