Jump to content

using MONTH() with integer date


scarhand

Recommended Posts

`the_date` is an integer whose value is inserted via the php time() function

 

this code doesn't seem to work, so I imagine I am missing a function:

 

$sql = 'SELECT SUM(`amount`) as donate_total from `donations` where MONTH(`the_date`) = MONTH(CURDATE())';

 

any help would be great.

Link to comment
https://forums.phpfreaks.com/topic/220882-using-month-with-integer-date/
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.