改名
This commit is contained in:
@@ -174,14 +174,12 @@ class Command extends Component
|
|||||||
*/
|
*/
|
||||||
private function insert_or_change($isInsert, $hasAutoIncrement): bool|string|int
|
private function insert_or_change($isInsert, $hasAutoIncrement): bool|string|int
|
||||||
{
|
{
|
||||||
if (!($result = $this->initPDOStatement())) {
|
if (($result = $this->initPDOStatement()) === false) {
|
||||||
var_dump($result);
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
if ($isInsert === false) {
|
if ($isInsert === false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var_dump($result);
|
|
||||||
if ($result == 0 && $hasAutoIncrement->isAutoIncrement()) {
|
if ($result == 0 && $hasAutoIncrement->isAutoIncrement()) {
|
||||||
return $this->addError(static::DB_ERROR_MESSAGE, 'mysql');
|
return $this->addError(static::DB_ERROR_MESSAGE, 'mysql');
|
||||||
}
|
}
|
||||||
@@ -207,7 +205,6 @@ class Command extends Component
|
|||||||
return $this->addError($this->sql . ':' . $error, 'mysql');
|
return $this->addError($this->sql . ':' . $error, 'mysql');
|
||||||
}
|
}
|
||||||
$result = $prepare->execute($this->params);
|
$result = $prepare->execute($this->params);
|
||||||
var_dump($result, $connect->errorInfo());
|
|
||||||
defer(fn() => $prepare->closeCursor());
|
defer(fn() => $prepare->closeCursor());
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
return $this->addError($connect->errorInfo()[2], 'mysql');
|
return $this->addError($connect->errorInfo()[2], 'mysql');
|
||||||
|
|||||||
Reference in New Issue
Block a user