Jump to content

date comparison


blue-genie

Recommended Posts

117 test 2010-05-12 2010-05-18 0 5 1 2010-05-17 10:56:30 9

118 uni 2010-05-19 2010-05-26 0 5 1 2010-05-17 11:14:07 9

119 test1 2010-05-27 2010-05-28 0 3 1 2010-05-18 11:19:50 9

 

assume the data above in a table.

items 118 is the only one who's start date /end date is within the current date (ie 2010-05-26) so i need some help with that .

 

SELECT gameID from gamedetails where date('2010-05-26') >= startDate AND date('2010-05-26')<= endDate AND gameIsActive = 1

seems to work but I just want to be sure.

Link to comment
https://forums.phpfreaks.com/topic/202951-date-comparison/
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.