WilliamMute
Programmer
- Jan 4, 2006
- 117
Hi All, I will appreciate if someone can point me in the right direction as I know this query is somehow not going to do what I want, Infact its not doing what I want but I cant seems to give my brain a boost to think of a way out.
I basically want the query to return results that are NEXT due and display them until its their due day is over. I.e
------------------------------------
Rota for the week begining 22/03/09
--- Person A
--- Person B
-----------------------------------
Rota for Week 29/03/09
--- Person C
--- Person D
-----------------------------------
So since we are in the current active week, it should display the first rota up until sunday night at 11:59:59pm then the second rota becomes active.
My code below only display the current rota, but once its sunday morning, the rota automatically disapear where I want it to remain active until midnight.
All help much appreciated in advance, Thank you!
I basically want the query to return results that are NEXT due and display them until its their due day is over. I.e
------------------------------------
Rota for the week begining 22/03/09
--- Person A
--- Person B
-----------------------------------
Rota for Week 29/03/09
--- Person C
--- Person D
-----------------------------------
So since we are in the current active week, it should display the first rota up until sunday night at 11:59:59pm then the second rota becomes active.
My code below only display the current rota, but once its sunday morning, the rota automatically disapear where I want it to remain active until midnight.
Code:
SELECT * from rota WHERE `date`>NOW() ORDER BY `date` ASC LIMIT 1
All help much appreciated in advance, Thank you!