Re: Multiple SQL queries...?

From: Date: Thu, 03 Jun 2004 16:54:43 +0000
Subject: Re: Multiple SQL queries...?
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-34641@lists.php.net to get a copy of this message
Not tested... how about something like this? SELECT t1.email, t2.count(*) FROM $table t1 LEFT JOIN $table t2 ON (t1.email = t2.email and t2.viewed = '1') GROUP BY EMAIL > Nope... > HHmmm, this is really getting to me... > I can do distinct, I can count, but I can't combine the two? > Can't be that hard ;-)

« previous php.db (#34641) next »