Logician, thank you, it works great. I made one small change becuase the results I was getting with the previous code were "screwy" at best..they did not correlate well to the post count I did manually.
The final code below:
// get posts over the past 30 days
$ago= mktime (date("H")-720, date("i"), date("s"), date("m"), date("d"), date("Y"));
$countrecentposts=$DB_site->query_first("SELECT COUNT(*) AS 30recent FROM post WHERE dateline >= $ago");
$total30recent=$countrecentposts['30recent'];
Thanks again!
|