Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7511813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:40:20+00:00 2026-05-29T23:40:20+00:00

Tags array(11) { [album] => string(17) Away From The Sun [artist] => string(12) 3

  • 0

enter image description here

 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:40:22+00:00Added an answer on May 29, 2026 at 11:40 pm

    Since the relationships depend on autoincrement IDs probably the best thing to do is to insert into the artist table and then call $artist_id = mysql_insert_id() to get the new ID number. You can then insert into album and call the same function as $album_id =mysql_insert_id()`. Finally insert your tracks using the IDs you just retrieved.

    You’ll be able to ensure you do not have albums without artists or tracks without albums, and you’ll need to insert albums and tracks without creating new artists or albums, so this should easily suffice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Wordpress, I need to generate an array of tags(terms) from posts in a
I'm trying to retrieve all the data id from a database where their tags(array)
I have an array of tags taken from a MySQL database. Obviously, these tags
Let's assume text is a String and contains a text. tags is an Array
I have an array of tags per item like so: item1 = ['new', 'expensive']
I have a object (product), with a property of type 'array' e.g. product.tags =
I have a model that has an array of Strings called tags, public class
Assuming a setup like this: blogposts { title:Example, slug:example-post tags: [foo, bar] }, {
Hello I want to access inactive tags inside this array any idea? stdClass::__set_state( array
I get the array data like this: $tags = $_GET['item']['tags']; if ($tags){ foreach ($tags

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.