Set new value only when it actually changes. Also set the last_modified date. Replaced mysql_real_escape_string() with xtc_db_input()