This commit is contained in:
2021-08-18 15:09:40 +08:00
parent 4e5bfe4887
commit c2236528ab
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -43,7 +43,6 @@ class ActiveQuery extends Component implements ISqlBuilder
public array $attributes = []; public array $attributes = [];
/** /**
* Comply constructor. * Comply constructor.
* @param $model * @param $model
@@ -270,7 +269,7 @@ class ActiveQuery extends Component implements ISqlBuilder
[$sql, $params] = $this->builder->insert($data, true); [$sql, $params] = $this->builder->insert($data, true);
return $this->execute($sql, $params)->exec(); return $this->execute($sql, $params)->exec(null, true);
} }
/** /**
+1
View File
@@ -168,6 +168,7 @@ class Command extends Component
{ {
$pdo = $this->db->getConnect($this->sql); $pdo = $this->db->getConnect($this->sql);
$result = $pdo->execute($this->sql, $isInsert, $this->params); $result = $pdo->execute($this->sql, $isInsert, $this->params);
var_dump($result);
if ($hasAutoIncrement && $result == 0) { if ($hasAutoIncrement && $result == 0) {
return false; return false;
} }