Using MySQL and PHP.
I have two tables products and stock.
products has { productID | product | brand|}
stock has { ID | storeID | productID | qty | price }
I need to get all of the brands available at a specific store.
So here is what I have that doesn’t work.
SELECT DISTINCT brand
FROM products
WHERE 'products.productID' = 'stock.productID'
AND 'stock.storeID' = 1
If I remove the compare “WHERE” it returns all of the brands.
Try