Tags array(11) {
["album"] => string(17) "Away From The Sun"
["artist"] => string(12) "3 Doors Down"
["bitrate"] => int(256000)
["title"] => string(16) "Ticket to Heaven"
["filename"] => string(23) "04 Ticket To Heaven.mp3"
["format"] => string(3) "mp3"
["play_time"] => float(207.5950625)
["genre"] => string(11) "Alternative"
["year"] => string(4) "2002"
["track"] => string(1) "4"
["art"] => string(21) "Away From The Sun.jpg"
}
I need help with taking the data from this array and populating these tables with the data and maintaining the relationships.
I extract data from these kinds of tables all the time and I build them with known data.
In this case the data is unknowable to me until I parse the id3 tag.
All 3 tables are auto incrementing on 'id'.
I typically work in Zend Framework, so answers in ZF are really helpful but php and sql are almost as good.
I found one question SQL Insert with data from multiple tables that seems to address this issue, but I don't have the sql to understand the answer.
Would a link table help?
P.S. I know the relationship lines in the figure are incorrect.