Pagination last link redirect? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Pagination last link redirect? (/showthread.php?tid=21156) |
Pagination last link redirect? - El Forum - 08-01-2009 [eluser]Tyler Diaz[/eluser] Hey there CI community, I'm a bit stumped on this one. Working on a forum script and I want it so when you post on a topic, it will redirect you to view your post. I've done the anchor part such as #post_id to drag you to where your post is, but how do I redirect to the last pagination link on the topic? Thanks in advance, Tyler. Pagination last link redirect? - El Forum - 08-01-2009 [eluser]jedd[/eluser] Hi Tyler - did you come up with a solution to this one? The algorithm seems straightforward enough -- at a guess you'd do count() of the posts, divide it by the number of posts-per-page, round down, and away you go -- but I suspect you wanted to reduce the number of calls to the DB. Pagination last link redirect? - El Forum - 08-01-2009 [eluser]Tyler Diaz[/eluser] That was my initial solution, kind of a "quick and dirty" feel to it but there seems to be little to none alternative. Thanks for the helpful reply jedd. |