diff --git a/Command.php b/Command.php index f14b05a..1df3274 100644 --- a/Command.php +++ b/Command.php @@ -209,9 +209,9 @@ class Command extends Component */ private function error(Throwable $throwable): bool { - error('mysql', [$throwable]); error($this->sql . '.' . json_encode($this->params, JSON_UNESCAPED_UNICODE)); - return addError($throwable->getMessage(), 'mysql'); + error(throwable($throwable), []); + return addError($throwable->getMessage(), 'mysql'); } diff --git a/SqlBuilder.php b/SqlBuilder.php index a2e0960..1befcca 100644 --- a/SqlBuilder.php +++ b/SqlBuilder.php @@ -138,7 +138,7 @@ class SqlBuilder extends Component */ public function delete(): string { - return 'DELETE FROM ' . $this->query->from . ' WHERE ' . $this->_prefix(); + return 'DELETE FROM ' . $this->query->from . $this->_prefix(); }