This commit is contained in:
2021-11-10 10:29:19 +08:00
parent e5a723cdb2
commit f49d7cfa4b
2 changed files with 222 additions and 220 deletions
-1
View File
@@ -120,7 +120,6 @@ class Command extends Component
$time = microtime(true);
if ($type === static::EXECUTE) {
$result = $this->db->getConnect($this->sql)->execute($this->sql,$this->params);
var_dump($result);
} else {
$result = $this->search($type);
}
+4 -1
View File
@@ -3,8 +3,8 @@
namespace Database\Mysql;
use Exception;
use Kiri\Context;
use Kiri\Abstracts\Logger;
use Kiri\Context;
use Kiri\Kiri;
use Kiri\Pool\StopHeartbeatCheck;
use PDOStatement;
@@ -258,6 +258,9 @@ class PDO implements StopHeartbeatCheck
}
$result = (int)$pdo->lastInsertId();
$prepare->closeCursor();
if ($result == 0) {
return true;
}
return $result;
}