or even easier have it be a scheduled task in the database. There is really
no reason to involve cf in the process unless you are using a db that
doesn't have its own task scheduler. That way you don't have to worry about
all the protection you have to put in a web page to make sure a spider
doesn't accidentally run it etc. Of course in this application rerunning the
task won't hurt anything.


----- Original Message -----
From: "Kelly Matthews" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, November 21, 2001 12:49 PM
Subject: RE: Deleting DB Records Automatically ???


> Sure you could set up a scheduled task in CF (say once a day at midnight)
> that runs a page
> that then runs a query deleting all records whose itemexpires date
> is less than NOW().
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 21, 2001 2:47 PM
> To: CF-Talk
> Subject: Deleting DB Records Automatically ???
>
>
> Hi
>
> I have a field in my database table called 'itemexpires' which contains a
> date field i.e. 17 November 2001.
>
> What I would like to do is when the date is reached in the date field
>
> ie
>
> if a record had a value in the 'itemexpires' field of 21 November 2001
this
> entire record would be automatically deleted from the database a day later
> (22nd November)
>
> 1.) Can this be done with Coldfusion?
> 2.) How can it be achieved?
>
> TIA
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to