Re: Getting total results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joseph Crawford wrote:
php 4 version is posted, let me know if you like it or not.  Please
keep in mind it is a very basic class, you could extend this in many
ways, especially to make the nav bar do something like << 1 2 3 4 ....
 25 26 27 28 >>


Hi Joseph,

thanx for your reply. I do already have some classe which do most of the job and I would rather not like to change the whole system. Johns suggestion seems sufficent to me. It works excellent in my case:

SELECT FOUND_ROWS()

to get the total number of rows there would have been without the limit. Still two queries (no way around that, anyhow), but hopefully optimized better by MySQL. Perform your own tests, of course.

See the documentation on FOUND_ROWS() at the following URL for more info: http://dev.mysql.com/doc/mysql/en/Information_functions.html

Thank you everybody,

Merlin

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux