Posted by Michael Fesser on 07/22/07 15:35
..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
Navigation:
[Reply to this message]
|