Jump to content

Relationship woes


Lukey

Recommended Posts

Yup im a newbie that doesnt understand the major differences in MS Access relationships and the way its done in mySQL any input would be appreciated

 

The problem:

 

I have a table called "house" with the house's address etc in it:

 

CREATE TABLE `house` (
  `id` int(11) NOT NULL auto_increment,
  `hname` varchar(20) default NULL,
  `hnum` varchar(5) default NULL,
  `hstreet` varchar(20) default NULL,
  `htown` varchar(30) default NULL,
  `harea` varchar(30) default NULL,
  `hcounty` varchar(20) default NULL,
  `hcountry` varchar(25) default NULL,
  `hprice` varchar(9) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

 

Im attempting to create a separate table that holds extra details about the houses such as number of bedrooms etc.  How would i link the two together using the "id" key in the house table?

 

Thanks for the time.

Link to comment
https://forums.phpfreaks.com/topic/52740-relationship-woes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.