| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|filtering queries based on number of matching results|
Lets say my database has some useful widget information in different tables as follows...
~ Widget title
~ Widget brand
~ Widget distributor
There are many brands which are in turn available from many distributors.
How would I print a list of brands that are available by at least TWO or more distributors?
$sql = "SELECT DISTINCT(distributor) FROM `".$config_databaseTablePrefix."widgets` ORDER BY distributor";
foreach($rows as $product)
$item = array();
$item["name"] = $product["distributor"];
From there... how would I implement a check to see if a brand has at least 2 distributors?
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved