Lets say I want to create a database with 3 tables in it and it looks something like this. The name of the database is memberDirectory
MySQL version:- 3.23.54
OS:- Win 2K Pro
Apache 1.3.xx + PHP 4.2.3
Code: Select all
CREATE TABLE tblPrimary
(
emailAddress varchar(100) NOT NULL default '',
password varchar(16) default NULL,
password2 varchar(16) default NULL,
UNIQUE KEY emailAddress (emailAddress)
) TYPE=MyISAM;
CREATE TABLE tblMember
(
memberID mediumint(9) NOT NULL auto_increment,
emailAddress varchar(100) default NULL, <--- I want this to be a foreign key to this table
lastName varchar(50) default NULL,
firstName varchar(50) default NULL,
PRIMARY KEY (memberID)
) TYPE=MyISAM;
CREATE TABLE tblFamily
(
familyID mediumint(9) NOT NULL auto_increment,
memberID mediumint(9) default NULL, <--- I want this to be a foreign key to this table
emailAddress varchar(100) default NULL, <--- I want this to be a foreign key to this table
firstName varchar(50) default NULL,
maritalStatus varchar(15) default NULL,
Occupation varchar(25) default NULL,
) TYPE=MyISAM;PS:- I also tried to convert the tables to "InnoDB" using the query editor in phpmyadmin and MySQL Control Center and somehow it still registers the tables as MyISAM.