Add mode to update only changed fields (when temporary tables not used)

Add mode to update only changed fields (when temporary tables not used)

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/ae908ae56bbdb02a#

Currently when a few fields are changed the form, we update all of them. We
are doing so, since MySQL will figure out that himself and won't break
anything down.

But when:

   - user validates his email
   - admin approves that user

in the same time, then user can overwrite it's approved status OR admin can
overwrite user email validation status.

To solve this problem I propose to add special parameter to kDBItem::Update
method OR just do this always, when temporary tables are not used, that
will:

   - call kDBItem::GetChangedFields() to get list of changed fields
   - only include that fields in UPDATE sql statement and not all database
   fields

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Comments