Updating a record while displaying all changes to it.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Brad_Strickland
Forum Newbie
Posts: 3
Joined: Tue Jul 13, 2004 2:08 pm
Contact:

Updating a record while displaying all changes to it.

Post by Brad_Strickland »

I don't know if I'm wording this right.
I have a textarea that is entered into a database. When this is edited, I want to store and display a list of all the changes that have been made to it.
Like a conversation in a forum. The reason for this is that I want past changes to be locked from editing.

Would a new database table storing only this text fields data need to be created? Maybe have column for the work request number and a second column for the text entered? But then wouldn't I need an third identifier column so the changes can be displayed in the right order?

Looking for sage like wisdom

Thanks
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: Updating a record while displaying all changes to it.

Post by JakeJ »

Each entry in to the text box should be kept as a separate record.

It's trivial however to string those records together in the display. I would however have users enter any new entries in a separate text box (one for display, one for entry).
Post Reply