The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
displaying data by month
the title is a bit iffy, my apologies.
i am in the process of making a stats page for an awards system. i can retrieve the required data from the database, however im stuck as to how i should write a query to retrieve data from only the current month. I have used unix timestamp to record when the award was given? any help would be most appreciated. thanks |
#2
|
|||
|
|||
$month = date('m');
$year = date('Y'); $month2 = ($month<=12)?($month+1):1; $year2 = ($month<=12)?$year$year+1); dateline >= ".mktime(0, 0, 0, $month , 1, $year)." AND dateline <= ".mktime(0, 0, -1, $month2, 1, $year2) |
#3
|
||||
|
||||
alternatively...
month(from_unixtime(dateline)) = month(now()) and year(from_unixtime(dateline)) = year(now()) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|