Re: Garbage Collection

From: Date: Thu, 05 Feb 2009 19:58:37 +0000
Subject: Re: Garbage Collection
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-287732@lists.php.net to get a copy of this message
On Thu, Feb 05, 2009 at 02:48:14PM -0500, tedd wrote: > At 7:03 PM +0000 2/5/09, Nathan Rixham wrote: >> IMHO forget the active flag, replace it with a field "deleted" which >> is a timestamp, then you've got an audit trail of when the it was >> removed :) >> >> infact often seen three fields on every table, "inserted, updated >> and deleted" all timestamps and self explanatory. > > Nathan: > > As usual, you (and others on this list) have clarity on this. > > I think I'll go your route except I'll have a "date created" and > "date inactive" field but not a "date updated" field. > > In this situation there would never be a reason for an update. After > all, the tutor_course record is created when an assignment is made -- > when the assignment is broken, then the record becomes inactive. So, > there's no reason to update. "Do, or don't do, there is no try." -- > Yoda Actually, if I needed a history, I wouldn't do it with timestamp fields in the table. I'd build a new file that contained the history. Maybe when timestamp operation char(1) what char(1) which id Paul -- Paul M. Foster

« previous php.general (#287732) next »