Dear All,
For now I have two tables as below. The tblTyre store all the tyres.Then tblTyreConfig store the relevant tyreID in each of the column for instance fl(front left wheel),fr(front right wheel),b1LI(back first left in wheel),b1L0(back first left out),b1RI(back first right in wheel),b1R0(back first right out),b2LI(back second left in wheel),b2L0(back second left out),b2RI(back second right in wheel),b2R0(back second right out. Thus if your notice now this design cater for a vehicle where it has 10 wheel 2 in front and 8 at the back. So now this is a static design. How can I can cater for more wheel by adding more columns is it? Any idea. Thank you.
CREATE TABLE IF NOT EXISTS `tblTyre` (
`tyreID` int(2) NOT NULL,
`tyreSerial` int(15) NOT NULL,
PRIMARY KEY (`tyreID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `tblTyreConfig` (
`vehicleID` int(5) NOT NULL,
`fl` int(2) NOT NULL,
`fr` int(2) NOT NULL,
`b1LI` int(2) NOT NULL,
`b1LO` int(2) NOT NULL,
`b1RI` int(2) NOT NULL,
`b1R0` int(2) NOT NULL,
`b2LI` int(2) NOT NULL,
`b2L0` int(2) NOT NULL,
`b2RI` int(2) NOT NULL,
`b2R0` int(2) NOT NULL,
PRIMARY KEY (`vehicleID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;