SELECT fth.intId, COUNT(*) AS intNewPosts,
(select count(*) from tblForumpost_fps
where intId_fth = fth.intid) as intTotalPosts
FROM tblForumpost_fps AS fps, tblForumthread_fth AS fth
WHERE fps.intId_usr <> 1 AND fps.datDateposted >
(SELECT MAX(datLogoutdate)
FROM tblLogin_log
WHERE intId_usr = 1) AND fth.intId = fps.intId_fth
GROUP BY fth.intId
Frågan#1
Med
SELECT fth.intId, COUNT(*) AS intNewPosts
FROM tblForumpost_fps AS fps, tblForumthread_fth AS fth
WHERE fps.intId_usr <> 1 AND fps.datDateposted >
(SELECT MAX(datLogoutdate)
FROM tblLogin_log
WHERE intId_usr = 1) AND fth.intId = fps.intId_fth
GROUP BY fth.intId
får jag ut antal nya inlägg i varje tråd. Hur skriver jag för att samtidigt få ut totalt antal inlägg i varje tråd? Måste jag använda två recordset?