I am build pagination but its give me stuck.

admin_cont Controller Page


$config['base_url'] = "http://localhost/Job-portal-CI/admin_cont/search_me";
$config['total_rows'] = $this->db->get("admin_emp_job_description")->num_rows();
$config['per_page'] = 2;
$config['num_links'] = 20;


$data['records'] = $this->db->get('admin_emp_job_description',$config['per_page'],$this->uri->segment(3));


View Page

<?php echo $this-> table-> generate($records); ?>    
<?php echo $this->pagination->create_links(); ?>


Its give me Link but when click on Next or 2 then given me blank page

Any One can suggest me what can i do for next..


can you post your codes from model?

You have to use the uri segment to do a select start and limit.

eg The second and third parameters enable you to set a limit and offset clause:

$query = $this->db->get('mytable', 10, 20);

// Produces: SELECT * FROM mytable LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)

RePost In Controller

$config["base_url"] = base_url() . "search_me/";
$config["total_rows"] = $this->admin_jobseeker_model->record_count();
$config["per_page"] = 2;
$config["uri_segment"] = 2;


$page = ($this->uri->segment(2))? $this->uri->segment(2) : 0;
$data["results"] = $this->admin_jobseeker_model->get_records($config["per_page"], $page);
$data["links"] = $this->pagination->create_links();

In Model

function record_count()
        return $this->db->count_all("admin_emp_job_description");

function get_records($limit, $start)
        $query = $this->db->get("admin_emp_job_description");
        if($query->num_rows() > 0)
            foreach($query->result() as $row){

                    $data[] = $row;
                return $data;
            return false;

In Routes

$route['search_me/(:any)'] = "admin_cont/search_me/$1";

Problem: Pagination URL link not working

Stuff..No One have Solution.

Solved this One.
I just make seprate function rather then index()
so now i Apply in index() and $config["base_url"] = "controller/index"