Pagination problem! |
[eluser]WebbHelp[/eluser]
Code: function imagegallery() This
[eluser]skylerrichter[/eluser]
its hard to say exactly cause I don't know what your database stucture looks like, but you need to add your limit and offset to your images query $images = $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id)) typicaly it would look like this $this->db->limit(2, $this->uri->segment(4)) where '2' is the amount of images you want to show per page, and $this->uri->segment(4) is the offset determined by the pagination class. here is a quick screencast on the pagination class http://net.tutsplus.com/videos/screencas...agination/
[eluser]WebbHelp[/eluser]
Thanks but I do it in this line: $content['images'] = $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id) ." ORDER BY id DESC LIMIT ". $config['per_page'] ." , ". $this->uri->segment(4)); Close to the end of the code I sent. Isn't that right or? Thanks
[eluser]WebbHelp[/eluser]
I tried your: Code: function imagegallery() Now I got: $images = $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id) ." ORDER BY id DESC LIMIT 2,". $this->uri->segment(4) .""); But it doesn't work! |
Welcome Guest, Not a member yet? Register Sign In |