I have a Mysql problem. (I use PHP with it).
For example I have this kind of database:
Name | Started and | will end
Jason | 2009-12-17 | 2009-12-24
Ericke | 2009-12-12 | 2009-12-30
Maria | 2010-01-02 | 2010-01-10
With mysql (or php) question I would like to get the names of people, which are “on” right now (2009-12-19).
The answer should be:
Jason
Ericke
Thank you for your great help in advance!
what about a query in which you compare dates ?
Something like this, I suppose, should do :
Notes :
>and<instead of>=and<=; depends on your data.curdate()function, which gets the date of the current day — I like it better than injecting the date into the query using some PHP code.