Browse Source

db Command performance tweak

tags/2.0.4
laszlovl 10 years ago committed by Carsten Brandt
parent
commit
8c22270591
  1. 3
      framework/db/Command.php

3
framework/db/Command.php

@ -310,12 +310,13 @@ class Command extends Component
return $this;
}
$schema = $this->db->getSchema();
foreach ($values as $name => $value) {
if (is_array($value)) {
$this->_pendingParams[$name] = $value;
$this->params[$name] = $value[0];
} else {
$type = $this->db->getSchema()->getPdoType($value);
$type = $schema->getPdoType($value);
$this->_pendingParams[$name] = [$value, $type];
$this->params[$name] = $value;
}

Loading…
Cancel
Save