Welcome Guest, Not a member yet? Register   Sign In
Problem with the pagination
#1

[eluser]barun the michael[/eluser]
I am trying to do pagination
this is controllers code
$config['base_url'] = 'http://dhruv/~mahesh/suggest';
$config['total_rows'] = $this->suggest_model->get_SuggestionData();

$config['per_page'] = '20';

$this->pagination->initialize($config);
and code for view is
<? echo $this->pagination->create_links(); ?>
but it showing error
#2

[eluser]Jamie Rumbelow[/eluser]
What is the get_SuggestionData() function?
#3

[eluser]Sumon[/eluser]
Try in this way. controller
Code:
$config[’base_url’] = ‘http://dhruv/~mahesh/suggest’;
$config[’total_rows’] = $this->suggest_model->get_SuggestionData();
$config[’per_page’] = ‘20’;

$this->pagination->initialize($config);
$data['page_links'] = $this->pagination->create_links();
$this->load->view('view_file_name' , $data);
and view
Code:
<?php echo $page_links;?>




Theme © iAndrew 2016 - Forum software by © MyBB