|
Posted by bill on 12/31/06 16:25
GT wrote:
> bill wrote:
>> Andy Hassall wrote:
>>> On Sat, 30 Dec 2006 17:04:58 -0500, bill <nobody@spamcop.net> wrote:
>>>
>>>> I am sure there must be an easy way to determine the number of rows
>>>> in a table, but I can't find it.
>>>>
>>>
>>> select count(*) from your_table
>>>
>>
>> $total_rows = mysql_query ("SELECT COUNT(*) FROM Kennel");
>>
>> gives me a resource, not the count.
>
> I guess it would. If you were to do it that way:
>
> $result = mysql_query ("SELECT COUNT(*) FROM Kennel");
> $array = mysql_fetch_array($result);
> $rows = $array[0];
>
yup, worked fine.
Many thanks.
bill
Navigation:
[Reply to this message]
|