phpbar.de logo

Mailinglisten-Archive

[php] mySQL - Max Datensatz

[php] mySQL - Max Datensatz

Arne Blankerts ABlankerts_(at)_freepoint.de
Thu, 16 Mar 2000 15:49:36 -0100 (CET)


On Thu, 16 Mar 2000 15:32:20 +0100, Cyberbob wrote:

>Weiá jemand wie ich die Anzahl der Datens„tze in einer Tabelle
>bei mySQL abfrage ????

 <?php 
								
     $db=mysql_connect('server','user','pass');
      mysql_select_db('database',$db);
     $result = mysql_query("select count(*) as num from table",$db);
     $num = mysql_result($result,0,"num");
      echo $num;

     ?>					


So mach ich's zumindest...

CYA/2 Arne
-- 
ABlankerts_(at)_freepoint.de

The day Micro$oft makes something that doesn't suck 
is the day they start selling vacuum cleaners.




php::bar PHP Wiki   -   Listenarchive