Welcome Guest, Not a member yet? Register   Sign In
Pagination link error, not working
#1

[eluser]harris_priambudi[/eluser]
Hello everybody
I got some trouble in pagination module for my web
the problem is the pagination link
for example 1 2 >
when it is on page 2 the 1 is still bolded and inactive.
can you help me? ( Im sorry for my bad english )
#2

[eluser]harris_priambudi[/eluser]
Code:
controller
$this->load->model('admin_models/mod_admin','',TRUE);
$this->load->library('pagination');
$data['vd_data']=$this->mod_admin->paging_video();
$this->load->view('pages/admin_pages/admin_video_panel', $data);

#3

[eluser]harris_priambudi[/eluser]
and its my models
Code:
function paging_video(){
$string_query        = "select * from video_data";
$query           = $this->db->query($string_query);
$config['base_url']     = base_url().'admin_controllers/con_admin/video_panel/';
$config['total_rows'] = $query->num_rows();
$config['per_page'] = '2';
$config['use_page_numbers'] = TRUE;
  
$num             = $config['per_page'];
$offset          = $this->uri->segment(4);
$offset          = ( ! is_numeric($offset) ||
        $offset < 1) ? 0 : $offset;  

if(empty($offset))
{
     $offset=0;
}  
$this->pagination->initialize($config);
$vd_data= $this->db->query($string_query."
limit $offset,$num");

$data['base']       = $this->config->item('base_url');
return $vd_data;
}
#4

[eluser]harris_priambudi[/eluser]
url
Code:
http://localhost/website/admin_controllers/con_admin/video_panel/
#5

[eluser]Aken[/eluser]
You did not specify the uri_segment config option. You even posted this problem in a thread where that was the exact solution...
#6

[eluser]harris_priambudi[/eluser]
ah my false, wrong thread




Theme © iAndrew 2016 - Forum software by © MyBB