Topic: Special Query
How can I have au query (Mysql 4.1) which list the top ten days (or week) where the forum has been the most active ?
Any idea, I'm stuck ...
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → Special Query
How can I have au query (Mysql 4.1) which list the top ten days (or week) where the forum has been the most active ?
Any idea, I'm stuck ...
err, I think the way to do it isn't to look at old posts but to look at new ones starting from when you put the feature in.
So, have a cron job that runs once a day. It gets the number of posts posted in the past day, compares it to the top 10, updates the list if necessary. Much eaiser than finding the 10 top days for a lot of pre-existing data
May be, but is not for a daily use only once each month io order to get a trend and see if my forum is more active now than before using punBB. What I'm lloking for is "just" the query ...
Find it ! Hope it could be helpfull
By day
SELECT count(*) as nb, DATE_FORMAT(FROM_UNIXTIME(posted), '%d-%m-%Y') as post from punbbposts group by post order by nb desc
by Week
SELECT count(*) as nb, DATE_FORMAT(FROM_UNIXTIME(posted), '%u-%Y') as post from punbbposts group by post order by nb desc
Aha, I forgot about that
PunBB Forums → PunBB 1.2 discussion → Special Query
Powered by PunBB, supported by Informer Technologies, Inc.