I have five tables.
harddrivemanufacturer
+------------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+----------------+
| harddrivemanid | tinyint(4) | | PRI | NULL | auto_increment |
| harddrivemanname | varchar(15) | | | | |
+------------------+-------------+------+-----+---------+----------------+
harddrivemodel
+--------------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+----------------+
| harddrivemodelid | tinyint(4) | | PRI | NULL | auto_increment |
| harddrivemodelname | varchar(25) | YES | | NULL | |
+--------------------+-------------+------+-----+---------+----------------+
harddrivecapacity
+------------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+----------------+
| harddrivecapid | tinyint(4) | | PRI | NULL | auto_increment |
| harddrivecapname | varchar(10) | YES | | NULL | |
+------------------+-------------+------+-----+---------+----------------+
harddrive
+------------------+------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------+------------+------+-----+---------+----------------+
| harddriveid | tinyint(4) | | PRI | NULL | auto_increment |
| harddrivemanid | tinyint(4) | YES | | NULL | |
| harddrivemodelid | tinyint(4) | YES | | NULL | |
| harddrivecapid | tinyint(4) | YES | | NULL | |
| interfaceid | tinyint(4) | YES | | NULL | |
+------------------+------------+------+-----+---------+----------------+
and a table inventory that allows for up to 8 hard drives to be entered for one machine.
What I need to be able to do is pull the harddriveid from the table inventory-the id in one or more of the 8 hard drives might be the same- which is the harddriveid from the table harddrive and relate it to the tables harddrivemanufacturer,harddrivemodel,harddrivecapacity. I would not be surprised if their is a join I could do.
Is there a way???
Thanks.
Steve