Re: mysql results with limit

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

 



Excellent ... thanks that is exactly what I wanted.

Michael.

On Sat, 04 Sep 2004 20:21:46 -0600
Doug Thompson <dthompson@xxxxxxxxxxxxx> wrote:

> Michael Gale wrote:
> > Hello,
> > 
> > 	Right now I have a mysql select statement with the LIMIT option
> > 	of 500.
> > Is there a way to find what the total number of selected results
> > would of been with out doing a mysql select first with out the limi
> > and using mysql_num_rows ?
> > 
> > Thanks
> > 
> 
> You could use SQL_CALC_FOUND_ROWS as it works somewhat differently,
> and probably faster, than the approach you suggest above.  This
> function was introduced in mysql 4.0.0.
> 
> http://dev.mysql.com/doc/mysql/en/Information_functions.html
> 
> Doug
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!

Michael Gale
Slackware user :)
Bluesuperman.com 

-- 
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