Re: Date stamp and purging

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17789
interpreted = N
texte = Gil Poulsen wrote: > > When the ad is placed, encode today's date + 90 days in a field and call it > [expiredate]. Then just set up a template that deletes any of those records > that have an [expiredate] field that is older than today's date, and hit the > template every few days. Around the end of August, the oldest records will > begin to be deleted. Ken Grome posted some real useful date formatting > guidelines a few days ago; you might weant to search the archives for that. > > Allan Morrison wrote: > > > > I'm setting up a classified ad site, and I'd like to have ads older than > > 90 days purged automatically. How would I go about setting up something > > like this.How about keeping a record in the database that stores the date that your database was last purged then when someone hits the entry page of your classifieds it looks at this field to see if it is todays date if not then it runs a purge of all the old dates and sets the purge field to todays date. The next time someone shows up it will look in the database and see that the database has been updated and won't attempt to run the purge routine. This will work for any page up to and including your main display page. Associated Messages, from the most recent to the oldest:

    
  1. Re: Date stamp and purging (Kenneth Grome 1998)
  2. Re: Date stamp and purging (Bob Minor 1998)
  3. Re: Date stamp and purging (Dave MacLeay 1998)
  4. Date stamp and purging (Allan Morrison 1998)
  5. Re: Date stamp and purging (Bob Minor 1998)
  6. Re: Date stamp and purging (Gil Poulsen 1998)
Gil Poulsen wrote: > > When the ad is placed, encode today's date + 90 days in a field and call it > [expiredate]. Then just set up a template that deletes any of those records > that have an [expiredate] field that is older than today's date, and hit the > template every few days. Around the end of August, the oldest records will > begin to be deleted. Ken Grome posted some real useful date formatting > guidelines a few days ago; you might weant to search the archives for that. > > Allan Morrison wrote: > > > > I'm setting up a classified ad site, and I'd like to have ads older than > > 90 days purged automatically. How would I go about setting up something > > like this.How about keeping a record in the database that stores the date that your database was last purged then when someone hits the entry page of your classifieds it looks at this field to see if it is todays date if not then it runs a purge of all the old dates and sets the purge field to todays date. The next time someone shows up it will look in the database and see that the database has been updated and won't attempt to run the purge routine. This will work for any page up to and including your main display page. Bob Minor

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Looping through all records (2000) NewCart+Search with one click ? (1997) [WebDNA] can webdna set the email header (w/[sendmail]) that controls where bounced email goes? (2012) [isfile] ? (1997) [WebDNA] =?windows-1252?Q?Re=3A_=5BWebDNA=5D_WebDNA=3A_Could_not_establis?= (2012) Database Structuring (again) (2003) Robert Minor duplicate mail (1997) Showif, Hideif reverse logic ? (1997) absolute paths for databases? (1997) Feature Request (1999) WebCat2b13MacPlugIn - more [date] problems (1997) Using tags to create a file name (2000) text size limitation (1997) Nested Loops and SHOWIFs (1997) Creating main- and sub-category search (1997) web delivery (1997) Newbie from and old bee (1997) date (1998) xml - amazon bug and sed q: (2004) WebCatalog for Postcards ? (1997)