That would be fine if I knew beforehand what categories the user has placed listings in.
Ok, let me explain this a different way.
I go to the site, and select my username. I have 4 items, 2 DVDs, 2 Movies. There are currently 3 categories: DVD, Movie, Other. I have nothing in the Other category.
I want the data to be formatted (not part of the question) like:
- DVD
- Item #1
- Item #2
- Movies
- Item #1
- Item #2
So, at first, I only want to return what categories THAT user has posted to. I need it to be able to select all categories if necessary.
Is it possible to go through a table, say from
$result = mysql_query("SELECT `listingType` FROM `listings` WHERE `listingOwner` = 'me'");
$return = mysql_fetch_array($result); // Correct?
and I know it's going to return something like DVD, DVD, Movie, Movie, and have it show me ONLY DVD, Movie?
Thats more what I'm looking for.