Welcome Guest, Not a member yet? Register   Sign In
Pagination dont show First and Last links and dont move between links numbers
#1

[eluser]Asinox[/eluser]
Hi, i dont know why is wrong with this pagination... but the pagination "is working" but dont show the links "First and Last" and dont move between numbers links... just the first number links (1 ) is select always in bold.

what is wrong?

Code:
//controller
function listar(){
        //paginacion
        $data['title'] = "MANEJAR COMENTARIOS | listar comentarios";
        $config['base_url'] = base_url().'index.php/adm/comentarios/listar/pagina';
        $config['total_rows'] = $this->ModComentarios->total();
        $config['per_page'] = '5';
        $config['full_tag_open'] = '<p>';    
        $config['full_tag_close'] = '</p>';
        $config['first_link'] = 'Inicio';
        $config['last_link'] = 'Final';
        $data['listar'] = $this->ModComentarios->listar($config['per_page'],$this->uri->segment(5));
        $this->pagination->initialize($config);
        //fin paginacion
        $data['main'] = "adm/admin_listar_comentarios";
        
        $this->load->vars($data);
        $this->load->view('adm/dashboard');
    }

Code:
//model
//listar todos los comentarios
    function listar($num,$offset){
        $this->db->select('*');
        $this->db->order_by("id_comment","DESC");
        $query = $this->db->get("comments",$num,$offset);
        return $query->result();
    }
    
    //contar todos los registros
    function total(){
        $this->db->select('*');
        $total = $this->db->get('comments');
        return $total->num_rows();
        
    }

Thansk


Messages In This Thread
Pagination dont show First and Last links and dont move between links numbers - by El Forum - 09-19-2008, 08:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB