For example i am posting a news via admin and mentioning the start date as 25-02-2011 and end date as 28-02-2011. It will display in the user side on 25the feb 2011.
If i post a news via admin on start date as 26-02-2011 and end date as 28-02-2011 then it will display the news on 26-02-2011.
If i didn't post anything on 27-02-2011 and 28-02-2011 it should display the last posted news. That is in this case it should display the news which is posted on 26-02-2011 for both 27-02-2011 and 28-02-2011.
EDIT: "SELECT id, title FROM news WHERE startDate >= CURDATE() AND
expiryDate <= CURDATE() AND status='Active' ORDER BY id DESC". There is a news in current date. It is not even fetching that record. What change to be done.
How can this be done using mysql.
thanks in advance...