[eluser]developer10[/eluser]
I'm wondering what's the purpose of $config['per_page'] item if it doesnt automatically
splits my records in order to show them in a defined number per page?
i set it, let's say, 10 items per page, and still pagination loads them all. then i need to manually insert
LIMIT in my query, but then again, i have to mess with other things again.
my model function:
Code:
function getUserInputs($username)
{
$config['per_page'] = 12;
$this->db->select()->from('_tbl_firme');
$this->db->join('users', '_tbl_firme.id = users.id', 'left');
$this->db->where('username', $username);
$this->db->order_by('f_vrijeme', 'desc');
// $this->db->limit($config['per_page'],0);
$query = $this->db->get();
$pagBase = site_url().uri_string().'/start';
$config['base_url'] = $pagBase;
$config['num_links'] = 4;
$config['uri_segment'] = $this->uri->total_segments();
$this->pagination->initialize($config);
if($query->num_rows() > 0) {
$result = $query->result();
}
return $result;
}
maybe someone would be kind enough to explain to me how to use this item properly.
thanks!