Welcome Guest, Not a member yet? Register   Sign In
pagination problem
#5

[eluser]Mainboard[/eluser]
yeah sorry, well this is my code
my Controller
Code:
function display ()
{
          
                
        $this->load->library('pagination');
        $this->load->library('table');
        
        $this->table->set_heading('Codigo Empleado', 'Nombre Completo de Empleado', 'Puesto de Trabajo', 'Ubicacion');
        $this->millenium_db = $this->load->database('millenium', true);    
        
        $config['base_url'] = site_url("link/display"); //'http://localhost:90/intranet/index.php/link/display';
        $config['total_rows'] = $this->millenium_db->get('no_listado_empleado')->num_rows();
        $config['per_page'] = 20;
        $config['num_links'] = 15;
        $config['full_tag_open'] = '<div id="pagination">';
        $config['full_tag_close'] = '</div>';
        
        $this->pagination->initialize($config);
        
        $data['records'] = $this->millenium_db->get('no_listado_empleado', $config['per_page'], $this->uri->segment(3));
        
        $this->load->view('rrhh/site_view', $data);
        
}
My View
Code:
&lt;body&gt;
     <div id="container" align="center">
        <h1>Listado General de Empleados</h1>
        
        &lt;?php echo $this->table->generate($records); ?&gt;
        &lt;?php echo $this->pagination->create_links(); ?&gt;
     </div>
    
[removed][removed]    

[removed]
    $('tr:odd').css('background', '#e3e3e3');
[removed]
&lt;/body&gt;
actually is one of the examples of nettuts and it works, but when i change to the other page the fields add to the same page and not load page per page, i was looking for and i found this link http://ellislab.com/forums/viewthread/151977/ that say that maybe is a problem with a some session, and actually i use this pagination in a intranet, but i don't know why doesn't works


Messages In This Thread
pagination problem - by El Forum - 08-10-2011, 08:54 AM
pagination problem - by El Forum - 08-10-2011, 11:17 AM
pagination problem - by El Forum - 08-10-2011, 08:06 PM
pagination problem - by El Forum - 08-10-2011, 08:41 PM
pagination problem - by El Forum - 08-11-2011, 08:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB