Hello and Happy New Year to everyone.
I posted this in another thread, but it was 6 months old and the system suggested I create a new thread so I'm doing just that.
I have 3 tables that I need to tie in with a junction table.
dvdpedia contains the tv series and movie titles.
actor contains the actor names
role contains the roles that an actor plays in a particular movie or tv series
actor2role is the junction table that will have an entry for each primary key of those 3 tables.
The problem I am facing is when querying the database to get the proper output without repeated values.
The simplest query works but returns repeated columns:
Code MySQL:
What would be the proper query here?
PS
This is the create tables syntax:
Code MySQL:CREATE TABLE `actor` ( `id` int(11) NOT NULL AUTO_INCREMENT, `titleId` int(11) NOT NULL, `actor` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), ) ENGINE=MyISAM DEFAULT CHARSET=utf8 CREATE TABLE `actor2role` ( `actorId` int(11) NOT NULL DEFAULT '0', `titleId` int(11) NOT NULL DEFAULT '0', `roleId` int(11) NOT NULL, PRIMARY KEY (`actorId`,`titleId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 CREATE TABLE `role` ( `id` int(11) NOT NULL AUTO_INCREMENT, `actorId` int(11) NOT NULL, `role` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
Thanks








but with the addition of a third table into this junction it has thrown me off because when you do certain operations on the actor table you cannot use FULL TEXT search for example.
. Does this look right?

Bookmarks