Zend_Db_Table_Adapter update change set

For programming and general questions on Zend Framework

Zend_Db_Table_Adapter update change set

Postby etoreo on Sat Mar 31, 2012 5:05 pm

Is there any way to get the change set after a row update of the fields that changed? I have poked around and it seems like there should be a way to get at this information, but it doesn't seem to be exposed.

Any help would be great,
~Eric
etoreo
 
Posts: 2
Joined: Sat Mar 31, 2012 4:51 pm

Re: Zend_Db_Table_Adapter update change set

Postby stryks on Sun Apr 01, 2012 12:10 am

Sorry, what do you mean by a 'change set'?

Do you want to know specifically the difference between new and old, or do you just want to know if a change was made?

To get the former, I think the best you could do would be to open the row you are editing before you update it so that you can compare them for differences.

For the latter, if you use the update method from the adapter, it returns the number of rows affected. So, if you do an update and it returns 0, then you know that the row was the same as the original.

It all depends on what you're trying to achieve.
stryks
 
Posts: 48
Joined: Tue Aug 04, 2009 1:13 pm

Re: Zend_Db_Table_Adapter update change set

Postby etoreo on Tue Apr 03, 2012 6:36 pm

Thanks for the reply, styks. I am just modifying 1 row and I would like to know which fields in that row changed during an update call.
etoreo
 
Posts: 2
Joined: Sat Mar 31, 2012 4:51 pm


Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 7 guests