Thread forum darstellen: bin am verzweifeln..
(16 answers)
Opened by steinwolf at 2004-01-02 16:43
hmm,
danke, vom ansatz her vielleicht das richtige. funktioniert aber vorne und hinten nicht! ok, nochmal ganz langsam: [sql]SELECT post_id, count(topic_id) FROM forum_posts WHERE post_id = topic_id AND forum_id = '1' GROUP BY topic_id ORDER BY post_id DESC LIMIT 0, 30 [/sql] :( Mysql-Tabelle sieht so aus: ----------------------------------------------------------- -post id----topic_id----forum_id ----nachricht usw. ist ja egal der rest.. -0 -----0 ---1-- blablubb -1 -----1 ---1-- bladibla -2 -----2 ---1-- ekrkerk -3 -----1 ---1-- nachricht bla ---------------------------------------------------------- FALSCH FALSCH FALSCH *heuel* bitte hääälft mir. die ausgabetabelle müsste ja dann irgendwie so aussehn: -post_id-------count(topic_id) //beziehungsweise anzahl antworten -0 0 -1 1 -2 0 ----------------------------------------------------------------- :rock: "Did you know? You can use your old motor oil to fertilize your lawn." - Blinkster - Professionelles EDV Forum
|