diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index 76ece2d41d..4b5ed97200 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -422,6 +422,14 @@ class so_sql } $data[$db_col] = (string) $this->data[$col] === '' && $this->empty_on_write == 'NULL' ? null : $this->data[$col]; } + // allow to add direct sql updates, eg. "etag=etag+1" with int keys + if (is_array($keys) && isset($keys[0])) + { + for($n=0; isset($keys[$n]); ++$n) + { + $data[] = $keys[$n]; + } + } $keys = ''; foreach($this->db_key_cols as $db_col => $col) {