I am having a bit of difficulty in getting the right value.
What I want to query is, the users who expire in 7 days, for example on 4th Oct 2011, the query should display the result of that particular day only. Right now I am querying as below:
select * from users where exp_date between now() and adddate(now(), INTERVAL 7 DAY).
this query keep display till next 7 days.
But i want to show only for or on 7th day expiring clients as I move on to tomorrow's date then the today's displayed query should not display on tomorrow's display rather it show the expiring client on 5th Oct 2011 and so on.
How do I achieve this? please help