Discussion: boy was i wrong
Afficher un message
Vieux 22/07/2007, 16h35   #2
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: boy was i wrong

..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
  Réponse avec citation
 
Page generated in 0,04639 seconds with 9 queries