Visa ett inlägg
Oläst 2007-12-22, 09:47 #5
coredevs avatar
coredev coredev är inte uppkopplad
Bara ett inlägg till!
 
Reg.datum: Sep 2007
Inlägg: 1 554
coredev coredev är inte uppkopplad
Bara ett inlägg till!
coredevs avatar
 
Reg.datum: Sep 2007
Inlägg: 1 554
Du löser det med en inner-sql fråga, samt group-by funktionen min:

select threads.timestamp, posts.subject, posts.post_id, threads.thread_id from threads, posts where threads.thread_id = posts.thread_id and forum_id = '2' and posts.id in (select min(id) from posts group by thread_id) order by threads.timestamp desc;

Eftersom jag inte har tillgång till din db, får du se det som pseudo-kod
coredev är inte uppkopplad   Svara med citatSvara med citat