from phpmyadmin:
CREATE TABLE `performances` (
`peform_id` int(3) NOT NULL auto_increment,
`stime` int(11) NOT NULL,
`etime` int(11) NOT NULL,
`location` varchar(300) NOT NULL,
`ref` varchar(500) NOT NULL,
`desc` varchar(500) NOT NULL,
`spec_req` varchar(500) NOT NULL,
`name` varchar(50) NOT NULL,
`position` varchar(30) NOT NULL,
`phone` varchar(12) NOT NULL,
`phone2` varchar(12) NOT NULL,
`email` varchar(50) NOT NULL,
`created` int(11) NOT NULL,
`ip` varchar(15) NOT NULL,
`status` int(2) NOT NULL,
`org_type` int(2) NOT NULL,
`org_id` int(4) NOT NULL,
PRIMARY KEY (`peform_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;
CREATE TABLE `orgs` (
`org_id` int(3) NOT NULL,
`name` varchar(100) NOT NULL,
`location` varchar(50) NOT NULL,
`description` varchar(300) NOT NULL,
`count` int(3) NOT NULL
PRIMARY KEY (`org_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `units` (
`unit_id` int(3) NOT NULL auto_increment,
`unit_type` varchar(10) NOT NULL,
`unit_num` int(8) NOT NULL,
`location` varchar(50) NOT NULL,
`council` varchar(50) NOT NULL,
`count` varchar(3) NOT NULL,
PRIMARY KEY (`unit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
so org_type in the performances table should tell me if the org for that performance is in the units table or the orgs table, then org_id in the performances table should give me the primary key for table indicated by org_type
i hope im explaining this correctly. also, if there is a better way to do this than what ive come up with, im all ears! thanks!
--Josh