View Single Post
  Crater Seraph
 
 
Crater Seraph's Avatar
slapstickhumor
 
Posts: 2,781
 
Reg: Mar 26 2002
 
ID: 363
 
RP: 100000
 
Final Fantasy VIII
djFirespade
Waiting
N/A
PlayStation
     
 
Default  Re: Help with mySQL tables
01.15.03, 08:52:49
  Post #5 (permalink)
 
     

Well, first off, all these unneccesary defaults need to go. Your first should look like....

Quote:
CREATE TABLE `session` (
`id` int(14) NOT NULL auto_increment,
`sessionid` varchar(255) NOT NULL,
`username` varchar(20) NOT NULL,
`auth` int(14) NOT NULL default '0',
`userid` int(14) NOT NULL default '0',
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
PRIMARY KEY (id)
);
Second....

Quote:
CREATE TABLE`comments` (
`id` INT(14) NOT NULL auto increment,
`newsid` INT NOT NULL,
`userid` INT(14) NOT NULL,
`comment` TEXT NOT NULL,
`date` TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
Also, you forgot back-ticks. How are you processing these queries?

______________________________________


Last edited by shovel : 01.15.03 at 08:55:55.
Send a message via AIM to Crater Seraph   Crater Seraph is offline
View Crater Seraphs Profile! Find more posts by Crater Seraph! Visit Crater Seraphs Homepage!