MySQL (tablo):
+----+------+
| id | text |
+----+------+
| 1 | |
+----+------+
| 2 | blah |
+----+------+
| 3 | |
+----+------+
| 4 | blah |
+----+------+
| 5 | blah |
+----+------+
PHP:
$a = mysql_query("SELECT COUNT(*) AS count1 FROM `table`");
$b = mysql_fetch_assoc($a);
echo $b['count1'];
Çıktı:
5
Mümkünse, aynı sorgu içinde - Ancak, ben de text fields hangisinin filled saymak istiyorum.
Sonuç:
5 in total
3 with filled text fields