I have two tables: manufacturers (containing manufacturerID, name) and items which contains things like itemID, desc, and manufacturerID to denote the mfg.
On the front page, I display a list of manufacturers that are in the manufacturer's table, but I don't want to display any manufacturer that does not have at least one item with that manufacturer's ID number...
I need something like
select manufacturers.manufacturerID, name from manufacturers, items where manufacturers.manufacturerID = items.manufacturerID and count(items.manufacturerID) > 0
This query doesn't work though...
How should I write this query?
Thanks
On the front page, I display a list of manufacturers that are in the manufacturer's table, but I don't want to display any manufacturer that does not have at least one item with that manufacturer's ID number...
I need something like
select manufacturers.manufacturerID, name from manufacturers, items where manufacturers.manufacturerID = items.manufacturerID and count(items.manufacturerID) > 0
This query doesn't work though...
How should I write this query?
Thanks