Jump to content

query for dates in db


poe

Recommended Posts

i have my dates stored in the db like in a field called fulldate:

 

1210118400

1210032000

1209945600

etc...

 

how do i do a query to count number of records that are in apr, may, june etc...

 

i have:

 

 

$ttl_apr = $db->numRowsQ(" SELECT * FROM clicks WHERE date('M', fulldate) = 'April' ");

 

$ttl_may = $db->numRowsQ(" SELECT * FROM clicks WHERE date('M', fulldate) = 'May' ");

 

thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/104659-query-for-dates-in-db/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.