Sreejith22
asked on
Help required writing join query
I need to get name(of a collection) from Table1 and name of all the songs in that collection from table 3 . Table 2 is the connection between table 1 and table 3. music_playlist_id connects table 2 to table 1. tbl_content_common_id connects table 2 with table 3.
Table 1
Table 2
Table 3
Any help is much appreciated
Table 1
CREATE TABLE IF NOT EXISTS `music_playlists` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`collection_id` int(10) NOT NULL,
PRIMARY KEY (`id`)
)
Table 2
CREATE TABLE IF NOT EXISTS `playlist_song_mappings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`music_playlist_id` int(11) NOT NULL,
`tbl_content_common_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
Table 3
CREATE TABLE IF NOT EXISTS `tbl_content_commons` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`content_common_code` varchar(20) CHARACTER SET utf8 NOT NULL,
`content_common_name` varchar(100) CHARACTER SET utf8 NOT NULL
)
Any help is much appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.