Ok, I really need some help.
I have three tables: products, bundles, and bundleItems
product(id, name)
bundle(id, name)
bundleItems(productid, bundleid)
OK, What I want to do is return a list of ALL distinct bundles and if they have products associated or not.
for example:
bundleid bundlename hasproducts
1 get 1 free false
2 discount true
3 multibuy false
Any ideas welcome but I want the SQL to be efficient as there could be many records.
Thanks in advance.
Chris
I have three tables: products, bundles, and bundleItems
product(id, name)
bundle(id, name)
bundleItems(productid, bundleid)
OK, What I want to do is return a list of ALL distinct bundles and if they have products associated or not.
for example:
bundleid bundlename hasproducts
1 get 1 free false
2 discount true
3 multibuy false
Any ideas welcome but I want the SQL to be efficient as there could be many records.
Thanks in advance.
Chris