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

[eluser]Unknown[/eluser]
hello everyone, I,m using codeigniter for several days now, and its all fine, but i'm having little problems with my pagination.

in my database I have table named content where the all main content for my web is stored, with columns: id, section_id, title, conntent.

How can I fetch all rows in table where for example section_id = 2 and set pagination to work properly

I used to work this way with query url; www.example.com?index.php?section_id=$id&page;=$page

i hope you understand what i mean and sorry for my english.

thanks
#2

[eluser]flaky[/eluser]
Code:
$this->db->where('section_id', $section_id);
$this->db->limit($limit, $offset);
$this->db->get('content');
#3

[eluser]Unknown[/eluser]
hey thanks a lot, that was really simple Big Grin..., just need some pratice with codeigniter!




Theme © iAndrew 2016 - Forum software by © MyBB