Aantal members in db showen
eelco
29/06/2004 11:51:00Ik heb bv. 10 members in mijn database
Hoe kan ik laten zien dat er 10 members in de database zitten?
Hoe kan ik laten zien dat er 10 members in de database zitten?
PHP hulp
26/11/2024 19:34:28Mitch X
29/06/2004 11:58:00eelco
29/06/2004 11:59:00Bram Z
29/06/2004 12:02:00Code (php)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
<?php
$sql="select * from members";
$res=mysql_query($sql);
$row=mysql_fetch_row($res);
$count=mysql_num_rows($res); //aantal members
//=================================
//Of zoiets lukt ook
$sql="select count(*) from members";
$res=mysql_query($sql);
$row=mysql_fetch_row($res); // $row[0] is aantal members
?>
$sql="select * from members";
$res=mysql_query($sql);
$row=mysql_fetch_row($res);
$count=mysql_num_rows($res); //aantal members
//=================================
//Of zoiets lukt ook
$sql="select count(*) from members";
$res=mysql_query($sql);
$row=mysql_fetch_row($res); // $row[0] is aantal members
?>