⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Suggestion: only update changed data



saulimus
  • profile picture
  • Member

Posted 05 September 2012 - 06:37 AM

Hopefully this is the right forum for this...
Just came across a nice feature in nuBuilder:

[quote]4. Full Multiple User Support

To avoid two or more users overwriting the same record nuBuilder only updates the fields on a record that have been changed. For example if 2 users have open the same customer record at the same time, with one user changing the customer's phone number and the other user changing the address, only the changes they make will be saved to ensure data integrity.[/quote]
http://www.nubuilder...?nav=Philosophy

This would be a nice feature for GroceryCrud, don't you think? :)
Another check one could implement is to query the database before update and see if the value shown to the user differs from the one in the database. If it differs, notify the user that someone else has changed the value...

Edit: A method that uses a separate column last_updated for checking:
http://codeigniter.com/forums/viewreply/774723/
GC could check for the existence of such a column and automatically use it for this purpose?...