This commit is contained in:
2023-04-02 01:21:39 +08:00
parent 4fd91f5f4f
commit 555ef93965
+2 -2
View File
@@ -81,7 +81,7 @@ class Command extends Component
public function one(): ?array
{
[$pdo, $statement] = $this->search();
$data = $statement->fetch(PDO::FETCH_ASSOC);
$this->db->release($pdo);
@@ -170,7 +170,7 @@ class Command extends Component
{
$pdo = $this->db->getSlaveClient();
try {
if (($statement = $pdo->query($this->sql)) === false) {
if (($statement = $pdo->prepare($this->sql)) === false) {
throw new Exception($pdo->errorInfo()[1]);
}
foreach ($this->params as $key => $param) {