=== modified file 'includes/database/mysql/query.inc' --- includes/database/mysql/query.inc Thu Aug 21 21:36:36 2008 +++ includes/database/mysql/query_odku_values.inc Mon Sep 01 01:59:30 2008 @@ -106,13 +106,6 @@ } unset($update_fields[$field]); } - - // Because we filter $fields the same way here and in __toString(), the - // placeholders will all match up properly. - $max_placeholder = 0; - foreach ($update_fields as $field => $value) { - $values[':db_update_placeholder_' . ($max_placeholder++)] = $value; - } $last_insert_id = $this->connection->query((string)$this, $values, $this->queryOptions); @@ -157,8 +150,10 @@ unset($update_fields[$field]); } + // Update fields based on insert supplied values make statement shorter, + // specially when big string literals are involved. foreach ($update_fields as $field => $value) { - $update[] = ($field . '=:db_update_placeholder_' . $max_placeholder++); + $update[] = ($field . '=VALUES(' . $field . ')'); } $query .= implode(', ', $update);