Hey Guys,
Ive got a MyBB forum and im looking at making a plugin to see what day had the most posts. In theory ive worked out how to do it, but I cant put it down in code.
In the MyBB stats table (mybb_stats), I have a dateline (unix timestamp) column and a posts column. The posts column is a running total of all posts made. A new row is added every 24 hours.
I need to work out which day had the most posts by subtracting the current post count by the post count of the previous day, and then that value subtracted by the previous day post count etc etc so I have daily post counts instead of a running total.
All I need to do then is find the largest number and return the dateline.
The section in bold italics is the part im stuck on. Im not sure how I should be attempting this, I'm pritty sure I require a new table to store all the daily post counts which I can easily create. Its just the subtracting to get the running total of post count down to the daily post count.
If anyone has any information that could be of help, it would be much appreciated.
Thank you