Child pages
  • Add mode to update only changed fields (when temporary tables not used)
Skip to end of metadata
Go to start of metadata

Imported From:

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

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

Best Regards,


  1. Hi Alex,

    I see your point and you must be right. I personally have NO problem with
    doing things in kDBItem::Update method, but we need check and check again
    that kDBItem::GetChangedFields() properly saves all the changes and Update
    works as expected.


  2. That is what you'll be doing after I attach the patch :)
    On Jan 29, 2011 11:45 PM, "Dmitry A." <> wrote: