SELECT COUNT(*) FROM (only on initial page).
Then pass that count from page to page. Then only one query will be necessary
for subsequent page requests.
The count will not always be accurate if records are added during the users
visit. But it's a quicker solution.
David Chamberlin <[EMAIL PROTECTED]> wrote:
> Just reviewed my post (should do that *before* hitting submit ... sigh
> ). One minor note, which should be obvious, but just for completeness:
> David Chamberlin wrote:
>> 1.SELECT * FROM
>> 2. get the number of rows from result
>> 3. figure out paging scheme
>> 4. SELECT FROM LIMIT ,
> I forgot to include the query criteria. i.e.,
> 1. SELECT * FROM WHERE/LIKE
> 2. get the number of rows from result
> 3. figure out paging scheme
> 4. SELECT FROM WHERE/LIKE LIMIT
> ,
> -Dave
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php