News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

A Different Kind of Sort by Date or Search Option

Started by Bob La Londe, September 14, 2012, 12:35:32 PM

Previous topic - Next topic

Bob La Londe

I have an application where it woud be interesting to look at some demographics by time of year. 

ie:  View all posts made in June from the day the forum went on-line until current. 


Is that practical? 

IchBin™

As a mod request most definitely. Not something I think needs to be in the forum by default IMO.
IchBin™        TinyPortal

butch2k

A simple SQL like this one should do the trick

i set a step for graphing purposes, adjust to match something meaningful
set @step=1000;
SELECT MONTH(FROM_UNIXTIME(poster_time)) as Month,count(*) as NbMsg, RPAD('',count(*)/@step,'*') as Graph
FROM `smf_messages`
GROUP BY Month


You should get something like this

Month   NbMsg   Graph
1   17865   ******************
2   21048   *********************
3   22559   ***********************
4   22257   **********************
5   27859   ****************************
6   29893   ******************************
7   22368   **********************
8   21489   *********************
9   29478   *****************************
10   26384   **************************
11   27115   ***************************
12   16740   *****************

Bob La Londe

Actually I was not thinking it as a statistical tool, but rather as a reading tool. 

Enter date range or month.  The title and 1st line or 2 of every post made during that range of every year is displayed. 


Advertisement: