[eluser]kalpesh[/eluser]
Hi,
I try to work out pagination in my application.
This is my controller:
Code:
$config['base_url'] = 'http://127.0.0.1/Credit/index.php/Card';
$config['total_rows'] = $this->credit->SelectCountCard();
$config['per_page'] = '3';
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$this->pagination->initialize($config);
if($this->uri->segment(3) == '0'){
$rows='0';
}else
{$rows=$this->uri->segment(3);}
$data3['CreditLimit']=$this->credit->SelectCardByLimit($rows,$config['per_page']);
This is my model class :
Code:
function SelectCardByLimit($limit,$limit1)
{
$this->load->database();
$query=$this->db->query('select Credit_Id,Credit_Name from card_master where Credit_Flag="True" limit '.$limit.','.$limit1.'');
if($query->num_rows())
{
return $query->result_array();
}else
{
$data['NoStore']="";
return $data;
}
}
Its not working properly.
Is there anything i am doing wrong?
Please help me
It is giving me error Unsupported operand types in library Pagination.php on line 112