|
@@ -282,9 +282,9 @@ class Driver extends \Qii\Driver\Base implements \Qii\Driver\Intf
|
|
|
*/
|
|
|
public function setError()
|
|
|
{
|
|
|
- if ($this->connection->getConnectionBySQL($this->sql)->errorCode() != '00000') {
|
|
|
+ if ($this->db['CURRENT']->errorCode() != '00000') {
|
|
|
$this->_errorInfo[$this->queryTimes]['sql'] = $this->sql;
|
|
|
- $this->_errorInfo[$this->queryTimes]['error'] = $this->iconv($this->connection->getConnectionBySQL($this->sql)->errorInfo());
|
|
|
+ $this->_errorInfo[$this->queryTimes]['error'] = $this->iconv($this->db['CURRENT']->errorInfo());
|
|
|
$this->response = \Qii\Driver\Response::Fail('pdo.error', $this->_errorInfo);
|
|
|
}
|
|
|
}
|
|
@@ -299,7 +299,7 @@ class Driver extends \Qii\Driver\Base implements \Qii\Driver\Intf
|
|
|
if (!$this->rs) {
|
|
|
return true;
|
|
|
}
|
|
|
- if ($this->connection->getConnectionBySQL($this->sql)->errorCode() != '00000') {
|
|
|
+ if ($this->db['CURRENT']->errorCode() != '00000') {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|