This commit is contained in:
2021-11-10 11:22:26 +08:00
parent b5f347b07a
commit a167169207
+1 -2
View File
@@ -250,12 +250,11 @@ class PDO implements StopHeartbeatCheck
{ {
$this->_last = time(); $this->_last = time();
$pdo = $this->_pdo(); $pdo = $this->_pdo();
var_dump($sql, $params);
if (!(($prepare = $pdo->prepare($sql)) instanceof PDOStatement)) { if (!(($prepare = $pdo->prepare($sql)) instanceof PDOStatement)) {
var_dump($prepare->errorInfo());
throw new Exception($prepare->errorInfo()[2] ?? static::DB_ERROR_MESSAGE); throw new Exception($prepare->errorInfo()[2] ?? static::DB_ERROR_MESSAGE);
} }
if ($prepare->execute($params) === false) { if ($prepare->execute($params) === false) {
var_dump($prepare->errorInfo());
throw new Exception($prepare->errorInfo()[2] ?? static::DB_ERROR_MESSAGE); throw new Exception($prepare->errorInfo()[2] ?? static::DB_ERROR_MESSAGE);
} }
$result = (int)$pdo->lastInsertId(); $result = (int)$pdo->lastInsertId();