变更
This commit is contained in:
+1
-3
@@ -96,9 +96,7 @@ class Command extends Component
|
|||||||
if (($prepare = $client->prepare($this->sql)) === false) {
|
if (($prepare = $client->prepare($this->sql)) === false) {
|
||||||
throw new Exception($client->errorInfo()[1]);
|
throw new Exception($client->errorInfo()[1]);
|
||||||
}
|
}
|
||||||
foreach ($this->params as $key => $param) {
|
$prepare->execute($this->params);
|
||||||
$prepare->bindParam($key, $param);
|
|
||||||
}
|
|
||||||
return $prepare->fetch(PDO::FETCH_ASSOC);
|
return $prepare->fetch(PDO::FETCH_ASSOC);
|
||||||
} catch (\Throwable $throwable) {
|
} catch (\Throwable $throwable) {
|
||||||
if (str_contains($throwable->getMessage(), 'MySQL server has gone away')) {
|
if (str_contains($throwable->getMessage(), 'MySQL server has gone away')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user