Re: Multiple pages of data.

From: Date: Wed, 29 Sep 2004 09:52:32 +0000
Subject: Re: Multiple pages of data.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198169@lists.php.net to get a copy of this message
You can solve it totally with SQL, using the FOUND_ROWS() function [http://dev.mysql.com/doc/mysql/en/Information_functions.html] I think this is the most efficient way of doing it... HTH, cheers Silvio Porcellana Nick Patsaros wrote:
I'm trying to build a bulletin style system right now. I have topics and replies to each topic. If a topic gets more than 15 replies I want them to start carrying over onto page 2 and then 3 and so on with 15 replies per page. The key that I'm missing I guess is, how do I keep track of the last accessed row in the database? So if I run a LIMIT 15 I can go back and pick up where I left on previously? Using the primary key isn't going to help because if posts get deleted I would have less than 15 per page. Maybe I'm totally lost on this though, if someone could give me a bit of help on the most efficient way to accomplish this. --Nick


« previous php.general (#198169) next »