PDA

View Full Version : Posts and threads from last month


mdoliwa
11-10-2010, 10:00 AM
I need a list of numbers of new threads/new posts grouped by forum.

I have something like this:


SELECT `forumid`,count(*) as `new threads`
FROM `thread`
WHERE dateline > UNIX_TIMESTAMP(DATE_SUB(CURDATE(),INTERVAL 30 DAY))
GROUP BY forumid order by `new threads` desc


Can you help me with joining it with forum table so I could get forum titles instead of forumids in results ?