My tables (not all fiels, but the importent ones for the select)
CREATE TABLE `medialib` (
`id` int AUTO_INCREMENT NOT NULL,
`guid` varchar(50),
`artist` varchar(255),
`title` varchar(255) ,
/* Keys */
PRIMARY KEY (`id`)
) ENGINE = MyISAM;
CREATE FULLTEXT INDEX `medialib_IndexArtist`
ON `medialib`
(`artist`);
CREATE FULLTEXT INDEX `medialib_IndexGUID`
ON `medialib`
(`guid`);
CREATE TABLE `songstation` (
`id` int AUTO_INCREMENT NOT NULL,
`guid` varchar(50),
`stationguid` varchar(50),
`songguid` varchar(50),
/* Keys */
PRIMARY KEY (`id`)
) ENGINE = MyISAM;
CREATE FULLTEXT INDEX `songstation_IndexSongGuid`
ON `songstation`
(`songguid`);
In short an entry in 'medialib' can have one ore more references in 'songstation' defending on who parent it.
So in my select I tell with 'songstation' is the parent, then I get the data from 'medialib' selected by first name in artist and sorted by artist.
hope that helped.