RE: [PHP] database value count retrieval

From: Date: Tue, 20 Aug 2002 02:03:49 +0000
Subject: RE: [PHP] database value count retrieval
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-113283@lists.php.net to get a copy of this message
> >SELECT COUNT(x) FROM table; > > > >Make 'x' equal to any column name in the table and add WHERE to the > >clause as needed. > > err...all very well, but how do i retrieve the > value afterwards? > $sqlcom="select count(codigo) from comments where > codigo=$id"; SELECT COUNT(codigo) AS SomeName FROM comments WHERE codigo='$id' Then you'll have 'SomeName' to play with. CYA, Dave

« previous php.general (#113283) next »