change-log

PHP MySQL SQL parser (INSERT and UPDATE)

I am looking to parse INSERT and UPDATE MySQL SQL queries in PHP to determine what changes where made from what original data. Now this would be pretty easy to create, but I want to see if there are any existing libraries in PHP to do this. Basically what I have is a table with all of the above queries that have been run on a database. ...

Do you only update the changed fields or all the fields?

I'm wondering if it's worth the server time when updating a record to retrieve the existing record, loop through the fields checking for changes and only putting the changed fields in the update query? (I am using MySQL & PHP.) The main reason for doing this is to reduce the size of the update query for change log purposes. Normally the...