Re: determining number of rows in a mysql table

From: Date: Tue, 30 Mar 2004 06:17:14 +0000
Subject: Re: determining number of rows in a mysql table
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-181778@lists.php.net to get a copy of this message
On Tuesday 30 March 2004 13:48, Andy B wrote: > my screwup...forgot some code here... heres the whole thing that actually > works...(thats what you get for being in tons of different windows at the > same time)... > <? > include("conf.db"); > mysql_connect($host, $mysqluser, $mysqlpwd); > $rows=mysql_query("select count(*) as count from users"); > $count=mysql_fetch_array($rows); > > echo $count['count']; > ?> That's better :-) -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* You've been Berkeley'ed! */

« previous php.general (#181778) next »