Hi Below is the schema of two MySQL tables. There is a table judges and trialjudges. What I want is a list of ALL the judges and some indicator where they are associated with trialid 1 (one). I am trying to create a multiple select box that will list all the judges but only highlight the judges that are associated with that trial #. I would like a list like this say for trialid 1; Judge InTrial --------------------------- Cherrie Treber Yes Ingrid Mills Yes Julie Andrews No It doesn't have to be yes, no, 1 or 0 would be just fine or something to tell whether they are in the trial. Thanks Tim Cowan ********************************************************************** # # Table structure for table `judges` # CREATE TABLE judges ( judgeid tinyint(3) unsigned NOT NULL auto_increment, judge char(70) NOT NULL default '', location char(100) NOT NULL default '', PRIMARY KEY (judgeid) ) TYPE=MyISAM COMMENT='List of judges for the trials'; # # Dumping data for table `judges` # INSERT INTO judges VALUES (1,'Cherrie Treber','Dayton Ohio, USA'); INSERT INTO judges VALUES (2,'Ingrid Mills','Lucan ON, Canada'); INSERT INTO judges VALUES (4,'Julie Andrews','Whitefish Montana, USA'); # -------------------------------------------------------- # # Table structure for table `trialjudges` # CREATE TABLE trialjudges ( tjid smallint(5) unsigned NOT NULL auto_increment, trialid tinyint(3) unsigned NOT NULL default '0', judgeid tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (tjid) ) TYPE=MyISAM COMMENT='associates judges with trials'; # # Dumping data for table `trialjudges` # INSERT INTO trialjudges VALUES (1,1,1); INSERT INTO trialjudges VALUES (2,1,2); INSERT INTO trialjudges VALUES (3,2,1); INSERT INTO trialjudges VALUES (4,2,4); --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php