On Sun, 23 Jun 2002, Mike Tuller wrote:

> I know I will need to create a separate table to hold information about
> the drives, and connect them to the computer by attaching the primary key
> of the drives table to the Computer table.

Good, you know a bit about normalisation.  But, not enough.  Look it up :)

> Computer Table
> ComputerID
> DriveID
> ------------------------
> Drive Table
> DriveID


Computer table:
computer id
computer model
computer location

Drive table
computer id
drive id
drive model
drive size

Then use SQL to join the tables on computer id to get the appropriate info.

Probably something like select computer.model, computer.location, drive.size 
from computer, drive where drive.computerid = computer.computerid and 
computer.computerid = blah

Or something so.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to