You need to use 2 separate queries. Current query will give distinct combination of 2 colums
SELECT DISTINCT category FROM product WHERE subcategory = '$subcategory'
SELECT DISTINCT brand FROM product WHERE subcategory = '$subcategory'
urtrivedi
Posting Virtuoso
1,714 posts since Dec 2008
Reputation Points: 299
Solved Threads: 362
Skill Endorsements: 24
select b.brand, c.category
from
(SELECT DISTINCT brand from product) b,
(SELECT DISTINCT category from product) c
smantscheff
Nearly a Posting Virtuoso
1,297 posts since Oct 2010
Reputation Points: 321
Solved Threads: 270
Skill Endorsements: 8