![]() |
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 |
$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) |
alternatively...
month(from_unixtime(dateline)) = month(now()) and year(from_unixtime(dateline)) = year(now()) |
All times are GMT. The time now is 07:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|