0

I`m working with phpMyAdmin database, and I have two tables - "Playlist" and "Songs". At the Playlist table I want to have a column of "Songs in playlist", that will contain a list of the "Songs id" from the "Songs" table. can I do that ?

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
Stefan Maimon
  • 233
  • 3
  • 12
  • Maybe this previous post on Stack Overflow will help you... http://stackoverflow.com/questions/459312/setting-up-foreign-keys-in-phpmyadmin – Bronwen Apr 21 '15 at 16:54

1 Answers1

2

You will need to add a new table that contains a reference to both playlist and songs. That way you have made a many-to-many relation. http://en.wikipedia.org/wiki/Many-to-many_%28data_model%29

idstam
  • 2,848
  • 1
  • 21
  • 30