do these tables look like they will work? i want theerror.errorcode to be a forgin key in the hostname.error but i don't know how to do the insert or if it's even posiable the way i have it set up.
thank you,
shark
// Table: error
Create Table: CREATE TABLE `error` (
`errorcode` tinyint(10) NOT NULL,
`errorname` varchar(40) NOT NULL,
PRIMARY KEY (`errorcode`),
UNIQUE KEY `errorname` (`errorname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
// Table: hostname
Create Table: CREATE TABLE `hostname` (
`PK` int(11) NOT NULL auto_increment,
`HostName` varchar(10) NOT NULL,
`Date` date NOT NULL,
`Error` tinyint(3) NOT NULL,
`tile` varchar(3) NOT NULL,
`location` tinyint(10) NOT NULL,
PRIMARY KEY (`PK`),
UNIQUE KEY `HostName` (`HostName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
// Table: location
Create Table: CREATE TABLE `location` (
`locationnumber` tinyint(10) NOT NULL,
`location` varchar(20) NOT NULL,
`labname` varchar(20) NOT NULL,
PRIMARY KEY (`locationnumber`),
UNIQUE KEY `location` (`location`,`labname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1