Re: Row Count

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

 



On Tue, Jun 10, 2008 at 3:51 PM, Jim Lucas <lists@xxxxxxxxx> wrote:
>
> So in your query, add this
>
> SELECT COUNT(*) as total FROM your_table
>
> Then in your code use this instead
>
> $rows = $rowcount['total'];
>
> This makes a little more sense then using the count(*) thing, to me at least

    Good call.  I should've added the 'as name' portion to my query to
begin with.  Jim's way is much nicer.

-- 
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux