fixed not working direct sql-updates (eg. 'etag=etag+1') via so_sql::save's parameter

This commit is contained in:
Ralf Becker 2007-09-06 11:57:14 +00:00
parent 59cf6042fa
commit 47994931b8

View File

@ -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)
{