This topic is locked

Archive old record to another table

1/16/2008 3:54:30 PM
PHPRunner General questions
W
wb3v author

As records in one of my tables become dated I would like to include the option for users to archive (move the old record) into another pre-defined table.

For example:

I would like to move a record from the "business_opportunity" table to "won" or "lost" or "no-bid" tables

A
alang 1/16/2008

Could you use the Copy function as the basis for what you want to do?

  • assume you want it to be a munual process ie initiated by user
  • could use code in the appropriate event handlers to implement MOVE function from one table to another
  • rename "Copy" to "Archive" in visual editor

W
wb3v author 1/16/2008

Could you use the Copy function as the basis for what you want to do?

  • assume you want it to be a munual process ie initiated by user
  • could use code in the appropriate event handlers to implement MOVE function from one table to another
  • rename "Copy" to "Archive" in visual editor


Thanks Alan, I'll give it a try.

J
Jepsen 1/17/2008

wb34
Isn't this overkill
I would have kept everything in one table and made a field with catagory "active, won, lost, coning, etc) and then you could either make a view for each catagory or you could use the advanced search to display the catagory you want.
And you just edit record ehrn you want to change from one cat to another.
You would only have one table to backup and administer.
rgds

Morten

W
wb3v author 1/17/2008

wb34

Isn't this overkill
I would have kept everything in one table and made a field with catagory "active, won, lost, coning, etc) and then you could either make a view for each catagory or you could use the advanced search to display the catagory you want.
And you just edit record ehrn you want to change from one cat to another.
You would only have one table to backup and administer.
rgds

Morten


Excellent! That is way I'll do it. Thanks.

Bill