From 33fa3780182b2e8a48e9fe1e761c87d777c66c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 7 Apr 2023 21:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Command.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Command.php b/Command.php index 226234a..04536af 100644 --- a/Command.php +++ b/Command.php @@ -93,11 +93,10 @@ class Command extends Component { try { $client = $this->connection->getConnection(); - if (($prepare = $client->query($this->sql)) === false) { + if (($prepare = $client->prepare($this->sql)) === false) { throw new Exception($client->errorInfo()[1]); } foreach ($this->params as $key => $param) { - var_dump($this->sql, $key, $param); $prepare->bindParam($key, $param, PDO::PARAM_STR | PDO::PARAM_INT); } return $prepare->fetch(PDO::FETCH_ASSOC);