[eluser]Asinox[/eluser]
Hi, im trying to make pagination, but the pagination is "fine" with some problem.... i think the problem is with the function model, the problem is that i see all my records and i see the pagination too..but dont go to the next pages with next records...and dont show the 5 records by pages
MODEL
Code:
function columnas(){
$this->db->select('*');
$this->db->from('columnas');
$this->db->where('autor',$this->db_session->userdata('user_name'));
$this->db->order_by('columna_id','desc');
$query = $this->db->get();
$this->db->count_all_results('columnas');
return $query->result();
}
CONTROLLER
Code:
function columnas(){
$this->load->model('panel/panel_model');
$config['base_url'] = base_url().'index.php/admin/panel/columnas/paginas/';
$config['total_rows'] = $this->panel_model->contar_columnas();
$config['per_page'] = '5';
$this->pagination->initialize($config);
$data['query'] = $this->panel_model->columnas();
$data['heading']='Columnas';
$data['page'] = $this->config->item('FAL_template_dir').'template_admin/panel/columnas';
$this->load->vars($data);
$this->load->view($this->_container);
}