Re: count query

From: Date: Tue, 08 Jan 2002 22:02:24 +0000
Subject: Re: count query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15544@lists.php.net to get a copy of this message
Hi, SELECT SUM(IF(id = '2',1,0)) AS field_name FROM table Versatile command - you can use it for quite a lot of things. Barry Rumsey wrote: > Is it posible to do a count(*) on a tabe where id=2 and count just those that id = 2 -- ---------- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org dbarton@prbo.org dbarton@grayflycatcher.org

« previous php.db (#15544) next »