fejl i sql ?

Tags:    databaser

Hey, får en fejl med denne SQL kode - nogle der kan se hvad der er galt ?

CREATE TABLE `tblusers` (
`UserID` int(10) unsigned NOT NULL auto_increment,
`UserEMail` varchar(45) NOT NULL default '',
`UserNickName` varchar(45) NOT NULL default '',
`UserName` varchar(45) NOT NULL default '',
`UserArticleID` int(10) unsigned NOT NULL default '0',
`UserTypeID` int(10) unsigned NOT NULL default '0',
`UserStatusID` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`UserID`),
UNIQUE KEY `idxUserNickName` USING HASH (`UserNickName`);

CREATE TABLE `tbluserstatus` (
`StatusID` int(10) unsigned NOT NULL default '0',
`StatusName` varchar(45) NOT NULL default '',
PRIMARY KEY (`StatusID`);

CREATE TABLE `tblusertypes` (
`UserTypeID` int(10) unsigned NOT NULL default '0',
`UserTypeName` varchar(45) NOT NULL default '',
PRIMARY KEY (`UserTypeID`);

CREATE TABLE `tblmailbox` (
`MailID` int(10) unsigned NOT NULL auto_increment,
`MailToUserID` int(10) unsigned NOT NULL default '0',
`MailFromUserID` int(10) unsigned NOT NULL default '0',
`MailSentTime` datetime NOT NULL default '0000-00-00 00:00:00',
`MailReadTime` datetime default NULL,
`MailTitle` varchar(100) default NULL,
`MailBody` text,
PRIMARY KEY (`MailID`);

CREATE TABLE `tblforums` (
`ForumID` int(10) unsigned NOT NULL auto_increment,
`ForumName` varchar(45) NOT NULL default '',
`ForumSortIndex` int(10) unsigned NOT NULL default '0',
`ForumVisibility` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`ForumID`),
UNIQUE KEY `idxForumName` (`ForumName`);

CREATE TABLE `tblforumthreads` (
`ThreadID` int(10) unsigned NOT NULL auto_increment,
`ForumID` int(10) unsigned NOT NULL default '0',
`ThreadParentID` int(10) unsigned default '0',
`ThreadAuthorID` int(10) unsigned default '0',
`ThreadTime` datetime default NULL,
`ThreadTitle` varchar(100) default NULL,
`ThreadBody` text,
PRIMARY KEY (`ThreadID`),
KEY `idxForumID` (`ForumID`),
KEY `idxThreadParent` (`ThreadParentID`);

CREATE TABLE `tblarticles` (
`ArticleID` int(10) unsigned NOT NULL auto_increment,
`AuthorID` int(10) unsigned NOT NULL default '0',
`ArticleStatusID` int(10) unsigned zerofill NOT NULL default '0000000001',
`ArticleModificationTime` datetime default '0000-00-00 00:00:00',
`ArticleActivationTime` datetime default '0000-00-00 00:00:00',
`ArticleExpirationTime` datetime default '0000-00-00 00:00:00',
`ArticleTemplateID` int(10) unsigned default '0',
PRIMARY KEY (`ArticleID`);

CREATE TABLE `tblarticleparts` (
`ArticleID` int(10) unsigned NOT NULL default '0',
`PartID` varchar(45) NOT NULL default '',
`PartContent` text,
PRIMARY KEY (`ArticleID`,`PartID`);

CREATE TABLE `tblarticlestatus` (
`StatusID` int(10) unsigned NOT NULL auto_increment,
`StatusName` varchar(45) NOT NULL default '',
PRIMARY KEY (`StatusID`);



1 svar postet i denne tråd vises herunder
0 indlæg har modtaget i alt 0 karma
Sorter efter stemmer Sorter efter dato
Hvilken fejl får du?

(¯`·._.·[Brian Hvarregaard]·._.·´¯)
Praesto et Persto



t