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 [EMAIL PROTECTED]
-- 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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]