I'm quite happy normally pulling arrays out of a DB, but now I'm trying to extract a list of distinct results from a single field and am not sure how to go about it. I've got this so far:
Code: Select all
$query = "SELECT DISTINCT Category FROM alba_catalogue ORDER BY Category asc";
$result = mysql_query($query);
while($category = mysql_fetch_array($result)){
echo"<p>$category</p>"; //Here's where I want a list of each of the categories
}