> What is the best way to get the total count as well as the paged
> content. Do I need to fire two queries or is there a trick which can do
> this in a single query?

I'm doing this on tables with many millions of records.  I take a hit once
to get a total record count then cache that value in the user's session.
Subsequent requests use that value instead of doing count(*) every load.

LIMIT offset,number handles pagination very well IMO.

Adam Erickson


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to