Welcome Guest, Not a member yet? Register   Sign In
Using ceil function with pagination
#1

[eluser]Mohammed Zayan[/eluser]
I using this code in the controller

Code:
$this->load->library('pagination');
        $config['base_url'] = 'http://localhost/mysite/index.php/site/index';
        $config['total_rows'] = $this->db->get('data')->num_rows();
        $config['per_page']   = 10;
        $config['num_links']  = 3;
        $this->pagination->initialize($config);
        $data['records'] = $this->db->get('data', $config['per_page'], $this->uri->segment(3));
        $this->load->view('site_view', $data);

and this in view

Code:
echo $this->pagination->create_links();

I have 114 row in my database
this code give my only the first 110 rows
I want to show all data and put the last 4 rows in page
In php I use ceil function
How can I do this with CodeIgniter?
#2

[eluser]Mohammed Zayan[/eluser]
sorry, It works Normally!!
I am not aware for the command.




Theme © iAndrew 2016 - Forum software by © MyBB