Hi
Firstly, I'm very VERY new to all this...
I have three tables in a mySQL database:
Table 1 = Artists (4 columns)
Artist_ID ¦ name ¦ Album ¦ Single
Table 2 = Awards (2 columns)
award_ID ¦ award_name
Table 3 = Awards Year (5 columns)
ID ¦ award_year ¦ artist_ID ¦ Awards_ID ¦ winner
What I've done so far, using this quiery
SELECT name, award_name, aw_year
FROM artists, awards, award_year
WHERE award_year.artist_id = artists.artist_id
AND award_year.award_id = awards.award_id
AND award_year.winner = "y"
is output the winners from the list (Artist table has over 40 entries, only 17 are winners).
What I'd like to do now is show the nomines for each award (usually 5 artists) with the winner highlighted. I guess by ordering them alphabetically on the winner column (always y or n) I could get the 'y' entry at the top. I'd like each one to be in it's own table.
The only way I know how to get the different awards on the page is by making a new quiery for each one - something I'm sure is not good.
I'm guessing I could set the award names as some sort of variable, that produces a new table for each award, but I've no idea at all how to do it.
I have looked around on the 'net but I don't really know what to look for.
Any help would be much appreciated!
CC