Select records according to date
Posted: Wed Feb 10, 2010 3:30 pm
i have a page that shows the user submitted car ads records from database. it works fine without any conditions applied.
when a user submit his car, it asks time period to display the ad and on the ad save page i calculate and set the expiry date of ad to store n database. suppose if user want to display his ad for 1 week and submitting his ad on 2010-02-10, i calculate the add on date with the display time period and store the expiry date with the addition of 7days in date like 2017-02-10.
everything works fine but now the problem is that on ad display page i want to show only those ads whose not expired.
those ads whose expiry date greater than current date.
when a user submit his car, it asks time period to display the ad and on the ad save page i calculate and set the expiry date of ad to store n database. suppose if user want to display his ad for 1 week and submitting his ad on 2010-02-10, i calculate the add on date with the display time period and store the expiry date with the addition of 7days in date like 2017-02-10.
everything works fine but now the problem is that on ad display page i want to show only those ads whose not expired.
those ads whose expiry date greater than current date.