> Anyway, I have a stack of 76 playlists I need to consolidate and 
 > display. These are from radio shows, so each playlist has 
 > the date, the name of the radio show, and anywhere from 20 - 27
 > artists, and albums on them.

It's really more an sql question than a php question but...

Have a table that contains dates and names of shows.

Have another table that contains artists.

Have another table that contains songs.

Have another table that contains tracks.

Each of these also has an ID in addition to the other data in the table.

Have a "linking" table that contains artist ID's and song ID's.  This
lets you, for example, look up all songs for a particular artists or,
potentially, all artists for a song.

Have another linking table that contains song ID's and album ID's.  This
lets you relate songs to albums and, through the previous table,
artists.  This way, though, you can have compilation albums with
multiple artists on a single album.

Last of all create another linking table with song ID's and show ID's.
This gets you songs for a show but, through the other linking tables you
get information on everything else.

For any additional information just store it in the relevant table (ie.
If you want to keep track of song lengths then it would go in the songs
table, if you wanted artist bios that would be in the artist table and
so on).

You'll obviously need to be doing a fair number of joins in your queries
but it will give you a more versatile structure.

Then write your php for the interface (oh, the easy bit, and finally
some mention of php, does that make this message on-topic now?)

CYA, Dave

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to