MyBB Community Forums

Full Version: no.of views during last 24 hour
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
need those posts and threads that has most numbers of views during past 24 hours in mybb
this is my query
SELECT f.name, p.pid,p.message,p.tid,p.fid,p.dateline as lastpost ,p.uid as lastposteruid,p.username as lastposter,p.replyto,p.subject as psubject, t.replies,t.subject as tsubject,t.views as tviews, u.avatar_30 FROM ptf_posts p INNER JOIN ptf_threads t on p.tid = t.tid INNER JOIN ptf_forums f on p.fid = f.fid INNER JOIN ptf_users u on p.uid = u.uid WHERE p.visible = 1 GROUP BY tid order by t.views DESC limit 0,15
how to get only those number of views that were published during last 24 hour