|
楼主 |
发表于 2014-9-18 21:48:45
|
显示全部楼层
调用示例
$this->load->library('page');
$config['base_url'] = base_url(array('admin','login_log','page'));
$config['total_rows'] = $this->db->count_all('admin_login_log');
$config['per_page'] = 18;
$this->page->initialize($config);
$page = intval($this->uri->get('page'));
$page = (($page-1)<0?0page-1)*$config['per_page'];
$this->db->from('admin_login_log');
$this->db->limit($config['per_page'],$page);
$query = $this->db->get();
return $query->result_array(); |
|