Query fehlerhaft

15
Bug #
Priorität3 (🔹 Normal)
BereichForum
TitleQuery fehlerhaft
BeschreibungDas Forumquery ist fehlerhaft.
Reported by @
 
Git Commit
Assigned to @ 26.10.2004 20:13
StatusResolved @ 15
1 up | 2 up | 3 up | 4 up | 5 up | 6 up |
^^^ Additional posts ^^^
zorg.ch
#55035 by @ 26.10.2004 20:15 - nach oben -
Wär hilfrich, dankä. häsch ä ERM vo dä DB?
Aber so wiän i dä zooomclan kenn gits so öpis gar nöd :-)
zorg.ch
#55041 by @ 26.10.2004 20:59 - nach oben -
schruuubts der! sowas grüsigs gits sicher nöd!
zorg.ch
#55042 by @ 26.10.2004 21:07 - nach oben -
ganz ruhig. i has doch gar nöd so gmeint. i bi jo selber dä gröscht feind vo dokumentierig. än echtä entwickler brucht jo soöpis gar nöd.
zorg.ch
#55055 by @ 27.10.2004 09:33, edited @ 27.10.2004 09:33 - nach oben -
Ich müesst de ganzi Clan froge obd sPW chasch ha, schneller gohts eso:

CREATE TABLE `comments` (
`id` int(11) NOT NULL auto_increment,
`thread_id` int(11) default NULL,
`parent_id` int(11) NOT NULL default '0',
`user_id` int(11) NOT NULL default '0',
`text` longtext collate latin1_german2_ci NOT NULL,
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`date_edited` datetime NOT NULL default '0000-00-00 00:00:00',
`board` char(1) collate latin1_german2_ci NOT NULL default '',
`error` text collate latin1_german2_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `BOARD_THREAD_PARENT` (`board`,`thread_id`,`parent_id`),
KEY `DATE_THREAD` (`date`,`thread_id`),
KEY `THREAD_DATE` (`thread_id`,`date`),
KEY `BOARD_PARENT` (`board`,`parent_id`),
KEY `USERID` (`user_id`),
KEY `THREAD_ID` (`thread_id`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci PACK_KEYS=1 AUTO_INCREMENT=55055 ;

CREATE TABLE `comments_boards` (
`board` char(1) collate latin1_german1_ci NOT NULL default '',
`title` varchar(50) collate latin1_german1_ci NOT NULL default '',
`field` varchar(50) collate latin1_german1_ci NOT NULL default '',
`link` varchar(100) collate latin1_german1_ci NOT NULL default '',
PRIMARY KEY (`board`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

CREATE TABLE `comments_subscriptions` (
`id` int(11) NOT NULL auto_increment,
`board` char(1) character set latin1 collate latin1_german2_ci NOT NULL default '',
`comment_id` int(11) NOT NULL default '0',
`user_id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `comment_id` (`board`,`comment_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci AUTO_INCREMENT=72 ;

CREATE TABLE `comments_threads` (
`board` char(1) collate latin1_german2_ci NOT NULL default '',
`thread_id` int(11) NOT NULL default '0',
`comment_id` int(11) default NULL,
`last_comment_id` int(11) NOT NULL default '0',
`last_seen` date NOT NULL default '0000-00-00',
`rights` tinyint(4) NOT NULL default '0',
`sticky` enum('1','0') collate latin1_german2_ci NOT NULL default '0',
PRIMARY KEY (`board`,`thread_id`),
KEY `board` (`last_comment_id`,`board`,`thread_id`),
KEY `sticky` (`sticky`,`last_comment_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci PACK_KEYS=1;

CREATE TABLE `comments_threads_favorites` (
`board` char(1) character set latin1 collate latin1_german2_ci NOT NULL default '',
`thread_id` int(11) NOT NULL default '0',
`user_id` int(11) NOT NULL default '0',
PRIMARY KEY (`board`,`thread_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

CREATE TABLE `comments_threads_rights` (
`board` char(1) collate latin1_german2_ci NOT NULL default '',
`thread_id` int(11) NOT NULL default '0',
`user_id` int(11) NOT NULL default '0',
PRIMARY KEY (`board`,`thread_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;

CREATE TABLE `comments_unread` (
`user_id` int(11) NOT NULL default '0',
`comment_id` int(11) NOT NULL default '0',
PRIMARY KEY (`user_id`,`comment_id`),
KEY `comment_id` (`comment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;
ALTER TABLE `comments_unread`
ADD CONSTRAINT `comments_unread_ibfk_1` FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE;
zorg.ch
#55141 by @ 27.10.2004 19:54, edited @ 27.10.2004 19:56 - nach oben -
merci, i lueg emol öbis anäbring :-)
zorg.ch
#55173 by @ 28.10.2004 09:42 - nach oben -
Wär cool!