Welcome Guest, Not a member yet? Register   Sign In
Pagination Algorithms
#2

[eluser]jedd[/eluser]
Hi kurucu. Curiously, I'm looking at something similar for my own rinky dinky forum system at the moment.

I haven't written anything yet, as I've been hoping for a great epiphany after a few weeks of 'background pondering'. Alas, no epiphany has been forthcoming.

My rough thoughts so far:

First, do a count() query for all relevant (ie. = thread_id, etc) messages where the id is less than or equal to the-desired-message-id.

Mod the result against your posts-per-page variable, then subtract same from earlier count() in order to get the CI pagination offset number.


Messages In This Thread
Pagination Algorithms - by El Forum - 09-01-2009, 06:24 AM
Pagination Algorithms - by El Forum - 09-01-2009, 06:50 AM
Pagination Algorithms - by El Forum - 09-01-2009, 06:56 AM
Pagination Algorithms - by El Forum - 09-01-2009, 07:25 AM
Pagination Algorithms - by El Forum - 09-01-2009, 08:30 AM
Pagination Algorithms - by El Forum - 09-01-2009, 09:45 AM
Pagination Algorithms - by El Forum - 09-02-2009, 02:23 AM
Pagination Algorithms - by El Forum - 09-02-2009, 03:58 AM
Pagination Algorithms - by El Forum - 09-02-2009, 09:28 AM
Pagination Algorithms - by El Forum - 09-02-2009, 02:30 PM
Pagination Algorithms - by El Forum - 09-03-2009, 03:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB