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
zorg.ch
#54855 by @ 25.10.2004 11:58 - nach oben -
Schon seit einem Weilchen... wäre um Hilfe dankbar.
zorg.ch
#54894 by @ 25.10.2004 14:42 - nach oben -
Zu wissen was genau es falsch macht wäre schon nützlich.
zorg.ch
#54915 by @ 25.10.2004 18:45, edited @ 25.10.2004 18:49 - nach oben -
törf i emol än blick uf datebank struktur wörfä? mir isch d'relationship zwüschet "comments_threads" und "comments" nöd ganz klar. i han än verdacht, dass öpis mit dä JOINs nöd ganz richtig isch.
zorg.ch
#54919 by @ 25.10.2004 19:10 - nach oben -
Jede thread het en comments_threads Record. D'Selektion goht über dieseb Table:

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;
zorg.ch
#54921 by @ 25.10.2004 19:34 - nach oben -
im erschtä review isch mir no kein fehler i dä abfrog ufgfallä. i han mir das ganze aber au erscht ä halb stund aglueget.
zorg.ch
#54989 by @ 26.10.2004 09:29 - nach oben -
Ok, wennd no meh tables bruchsch zeig ichs dir gern.
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!
zorg.ch
#54924 by @ 25.10.2004 19:48 - nach oben -
Ich sehe gerade, dass auch Bug 475 hier drin involviert ist. Ich schaue mir das einmal an.
zorg.ch
#54925 by @ 25.10.2004 19:57 - nach oben -
Wiä channi än bug überneh?
zorg.ch
#54990 by @ 26.10.2004 09:31 - nach oben -
Jetzt sötsch chöne, has abgeh.