Hi i have a table subforum with structure as follows
subforumid - int auto increment
forumid -int
userid -int
projectid -int
subject - longtext
createdate - datetime
deleted - int
now i want to display the number of replies and the last post's time.
Code:
select createdate, forumid, count(subforumid) from subforum group by forumid order by createdate desc
it runs but does not give expected result. it order the createdate in result created by
Code:
select createdate, forumid, count(subforumid) from subforum group by forumid
i know i am doing something wrong here but cannot figure out.
do i have to use multiple queris?
thanks