RE: [PHP-DB] LIMIT
| From: | Dwight Altman | Date: | Fri, 30 Jun 2006 14:29:31 +0000 |
| Subject: | RE: [PHP-DB] LIMIT | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42141@lists.php.net to get a copy of this message | ||
Thanks, but that's an additional query.
I was wondering if there may be a PHP function that can operate on the
$result or perhaps $link of the single query that uses a LIMIT clause and
have the information [count(*) had there not been a LIMIT clause
"count_no_limit(*) maybe?" even though there was a LIMIT clause]. Something
like mysql_info.
Regards,
Dwight
x2407
> -----Original Message-----
> From: Frank M. Kromann [mailto:frank@kromann.info]
> Sent: Thursday, June 29, 2006 5:46 PM
> To: Dwight Altman
> Cc: php-db@lists.php.net
> Subject: Re: [PHP-DB] LIMIT
>
> What about 'select count(*) from aTable'
>
> - Frank
>
> > Is there a way to get the number of rows that would have been returned
> had
> > there not been a LIMIT clause in a SELECT statement?
> >
> > For example, if
> > Query #1) SELECT * FROM aTable
> > would normally return 100 rows. But
> > Query #2) SELECT * FROM aTable LIMIT 5
> > will return 5 rows. Is there a way to find out that 100 rows would
> have
> > been returned if there was no LIMIT clause, by using only Query #2 and
> maybe
> > a PHP function on the $result?
> >
> > Regards,
> > Dwight
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>