User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 427,119 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,092 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 1179 | Replies: 1
Reply
Join Date: Oct 2006
Posts: 1
Reputation: shark0302 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
shark0302 shark0302 is offline Offline
Newbie Poster

Help Help i'm not sure if this table set up will work

  #1  
Oct 19th, 2006
do these tables look like they will work? i want theerror.errorcode to be a forgin key in the hostname.error but i don't know how to do the insert or if it's even posiable the way i have it set up.

thank you,
shark


// Table: error
Create Table: CREATE TABLE `error` (
`errorcode` tinyint(10) NOT NULL,
`errorname` varchar(40) NOT NULL,
PRIMARY KEY (`errorcode`),
UNIQUE KEY `errorname` (`errorname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

// Table: hostname
Create Table: CREATE TABLE `hostname` (
`PK` int(11) NOT NULL auto_increment,
`HostName` varchar(10) NOT NULL,
`Date` date NOT NULL,
`Error` tinyint(3) NOT NULL,
`tile` varchar(3) NOT NULL,
`location` tinyint(10) NOT NULL,
PRIMARY KEY (`PK`),
UNIQUE KEY `HostName` (`HostName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
// Table: location
Create Table: CREATE TABLE `location` (
`locationnumber` tinyint(10) NOT NULL,
`location` varchar(20) NOT NULL,
`labname` varchar(20) NOT NULL,
PRIMARY KEY (`locationnumber`),
UNIQUE KEY `location` (`location`,`labname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2006
Location: Canada
Posts: 11
Reputation: theonlydrayk is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
theonlydrayk's Avatar
theonlydrayk theonlydrayk is offline Offline
Newbie Poster

Re: Help i'm not sure if this table set up will work

  #2  
Jan 29th, 2007
go in phpmyadmin and test it
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 6:16 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC