This commit is contained in:
2021-11-10 10:18:45 +08:00
parent b3d1f64241
commit d56b28a4aa
+1 -11
View File
@@ -119,7 +119,7 @@ class Command extends Component
try {
$time = microtime(true);
if ($type === static::EXECUTE) {
$result = $this->insert_or_change();
$result = $this->db->getConnect($this->sql)->execute($this->sql,$this->params);
} else {
$result = $this->search($type);
}
@@ -156,16 +156,6 @@ class Command extends Component
}
/**
* @return bool|int
* @throws Exception
*/
private function insert_or_change(): bool|int
{
$pdo = $this->db->getConnect($this->sql);
return $pdo->execute($this->sql,$this->params);
}
/**
* @return int|bool|array|string|null
* @throws Exception