Re: mysql results with limit
| From: | Michael Gale | Date: | Sun, 05 Sep 2004 05:38:08 +0000 |
| Subject: | Re: mysql results with limit | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36049@lists.php.net to get a copy of this message | ||
Excellent ... thanks that is exactly what I wanted.
Michael.
On Sat, 04 Sep 2004 20:21:46 -0600
Doug Thompson <dthompson@brickbarn.com> 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