i dont know how will this will work, but you could try storing the multiple hard disk details for each computer in an "array" in 1 field. then when you want to get the information from the db, use explode() to store the value in the field into an array again.
e.g. the field in the DB might look like this... HardDriveSize = "1.2Gb,25Gb,25Gb" so get the field from the db and then use explode() to store it in an array in php. e.g. $disk_size = explode("," , $field); i dont know how well this will work for you...i'm only a newbie. -----Original Message----- From: Mike Tuller [mailto:[EMAIL PROTECTED]] Sent: Monday, 24 June 2002 3:43 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Question I am wanting to create a PHP frontend to a database that holds information about the computers that I take care of. I have a problem though when it comes to storing hard drive information. In most cases, the computers have one drive, but some have 2 or more, so I can't create the main database with fields like this. ComputerID HardDriveType HardDriveSize 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. Computer Table ComputerID DriveID ------------------------ Drive Table DriveID HardDriveType HardDriveSize This is where I am unsure. If there is more than one drive, then this would be incomplete because it would only show one drive. What is the best way to make it so that all drives show for the computer, or am I doing this backwards? Should I tie the computer to the drive instead? Thanks, Mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php