Does anyone know how do do a delete using CF/SQL that will delete items if they are older than a certain amount of days?
I am writing an classifieds application and I want it to delete any ads that are older than 30 days. When the ad is posted it inserts the current date into the database in the following format mm/dd/yyy. When a user queries the ads I want a delete statement to run first that will look at the ads and then delete the ones that are older than 30 days. However I am not sure how to write the where statement in the query. Can anyone help me with this?
I am writing an classifieds application and I want it to delete any ads that are older than 30 days. When the ad is posted it inserts the current date into the database in the following format mm/dd/yyy. When a user queries the ads I want a delete statement to run first that will look at the ads and then delete the ones that are older than 30 days. However I am not sure how to write the where statement in the query. Can anyone help me with this?