Forums :: Blogs :: Blog entry for 8 November 2006 06:26:56 GMT

8th November 2006 06:26:56 GMT
Blog entry for 8 November 2006 06:26:56 GMT
Rob's avatar

85 post(s) since
24th November 2004 22:22:29 GMT
The menu on the left now shows the top 5 most active threads in the forums.  Activity is calculated as the average date/time of all that thread's posts.

I had to get a bit creative with the SQL since the AVG() function doesn't work with datetimes.  Below is the part of the query that calculates post activity:

AVG((YEAR(post.dateTime) * 365.25) + (MONTH(post.dateTime) * 12) + DAY(post.dateTime)) AS averageDateTime
"Prepare for an oblivion for which there is no preparation." - O'Malley (Red Vs Blue)

Add Post

You must be Archangel/1B or greater to add posts to this thread.

Valid XHTML 1.1 Strict Valid CSS