Re: Fastest way to get table records' number
| From: | Daniel Brown | Date: | Wed, 19 Mar 2008 18:12:55 +0000 |
| Subject: | Re: Fastest way to get table records' number | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271841@lists.php.net to get a copy of this message | ||
On Wed, Mar 19, 2008 at 1:53 PM, David Giragosian <dgiragosian@gmail.com> wrote:
> Doesn't the 1 in "Select count(1) from table" refer to the first
> column in the table, like order by 1 asc?
No, it evaluates to Boolean TRUE. It's the same as the one (1) here:
SELECT * FROM table WHERE 1;
--
</Daniel P. Brown>
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283