| Welcome to WebmasterWorld Guest from 126.96.36.199 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor|
|filtering queries based on number of matching results|
| 12:38 pm on May 4, 2010 (gmt 0)|
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.
© Webmaster World 1996-2014 all rights reserved