Click to See Complete Forum and Search --> : Correct syntax Union select


Josephsch
05-31-2005, 12:43 PM
Hi could somone kindly correct this for me?
$result = mysql_query("SELECT Distinct `Category` FROM `Products`, as Cat, Union SELECT Distinct `Category2` FROM `Products`, as Cat, Union SELECT Distinct `Category3` FROM `Products`, as Cat ")

so that i have a result of all unique categories regardless of if they are in category1,2 or 3 in one row.

Thanks.