Welcome Guest, Not a member yet? Register   Sign In
Pagination problem in CI
#1

[eluser]rajyakshmik[/eluser]
Hi,
I m facing one problem in pagination.Records are showing corretcly and page numbers are not showing properly.If i click pagenum2 also still page 1 link is activated and records are as per 2page.Can u please help me on this.


This is my controller
function couponsissued($dealid)
{
$this->load->library('pagination');
$config['base_url'] = $this->config->item('base_url').'main/couponsissued/'.$dealid;
$usrdata = array(
'dealid' => $dealid
);
$this->session->set_userdata($usrdata);
$this->db->where('DealID', $dealid );
$this->db->from('code');

$config['total_rows'] = $this->db->count_all_results();


$config['per_page'] = '1';
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$this->pagination->initialize($config);

$this->load->model('coupons_model');
$data['results'] = $this->coupons_model->get_coupons($config['per_page'],$this->uri->segment(5));

$this->load->view('couponsissued.html',$data);



}
Before clicking pagination my url is
http://colonizer1/dealfrontier/main/coup...ed/RES0001
After clicking pagination my url is
http://colonizer1/dealfrontier/main/coup...001/1(when i m second page)


Messages In This Thread
Pagination problem in CI - by El Forum - 04-26-2009, 10:48 PM
Pagination problem in CI - by El Forum - 04-26-2009, 11:13 PM
Pagination problem in CI - by El Forum - 04-26-2009, 11:16 PM
Pagination problem in CI - by El Forum - 04-26-2009, 11:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB