Posted by Norman Peelman on 07/22/07 20:58
Michael Fesser wrote:
> .oO(Norman Peelman)
>
>> Is the field 'approved' a TEXT field or a numeric field (INT for
>> example)?
>>
>> If its a numeric field then:
>>
>> SELECT * FROM $db_table8 WHERE approved = 0
>
> Better:
>
> SELECT COUNT(*) FROM $db_table8 WHERE approved = 0
>
> If you just want to get the number of records, it's not necessary to
> transfer all data from the DB to the script, just to throw it away after
> calling mysql_num_rows().
>
> Micha
Of course you're right... I assumed the op was doing something else
with the data.
Norm
[Back to original message]
|