problem with pagination - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: problem with pagination (/showthread.php?tid=58304) |
problem with pagination - El Forum - 06-01-2013 [eluser]codecombustor[/eluser] for some reason the pagination isn't working when i click next $this->load->library('pagination'); $c_paginate['base_url'] = site_url('record/index'); $c_paginate['per_page'] = '6'; $config['uri_segment'] = '3'; $query = $this->db->get_where('table', array('fieldname' => $field)); if ($query->num_rows() > 0) { $i=0; foreach ($query->result() as $row) { $this->data['rec'][$i] =$row->field2; $this->data['rec'][$i] = $row->field3; $i++; } problem with pagination - El Forum - 06-01-2013 [eluser]jairoh_[/eluser] where is the $config['total_rows']? and besides, you didn't not initialize it. http://ellislab.com/codeigniter/user-guide/libraries/pagination.html |