John,
Perfect. Don't know where my head was.
Miles
At 10:29 AM 1/16/2004 -0500, John W. Holmes wrote:
Miles Thompson wrote:
<snip> } // foreach
My question is if there is a faster, cleaner way to do this? I did try array_search, but as it looks for any matching value anywhere in the target array the results it returned were not reliable.

If I'm understanding you correctly, I think this'll work:


SELECT c.nClassKey, c.Classification, COUNT(s.nClassKey) FROM classifications c LEFT JOIN subscribers s ON c.nClassKey = s.nClassKey GROUP BY c.nClassKey

--
---John Holmes...

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to