RE: [PHP] update form design question.

From: Date: Wed, 25 Apr 2001 23:26:20 +0000
Subject: RE: [PHP] update form design question.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50382@lists.php.net to get a copy of this message
On 25-Apr-01 Larry Hotchkiss wrote: > Basically I am just trolling for some thoughts on how others may > accomplish this task. > > I have a mysql database. In the database I of course have records. > These records have a date field and after so many days I have a script > to delete old records. Now, there are often times when a user will want > to "refresh" one or more records and also delete one or more as well and > possibly not do anything to other records. > > My initial thought was to have thier records displayed with 2 > checkboxes, one to check to delete the record and one to check to > refresh(renew the record by setting the date field to the current date). > Not checking either will simply do nothing to the record in question. > id int auto_increment not null primary key, ts timestamp not null, valid tinyint not null default 1, uid int not null, ... to "refresh" : update table set valid=valid+1 where id=$id to "delete": update table set valid=0 where id=$id the expire & cleanup script: update table set valid=0 where ts < date_sub(now(), interval 7 day) delete from table where valid=0 > Most users will have anywhere from 50 to 3000 records and 3k records > would be a little unwieldy to display on one page which brought up a > concern for how to handle the processing of the previous page of records > when you head to the next. Should I update the DB as I move to the next > page or perhaps after all pages are viewed? > > Anyways, any thoughts, ideas and or suggestions are all welcome. I'd think a "commit changes" on the last page would be more intuitive for the users, but the programming would get a bit complex ... Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#50382) next »