变更
This commit is contained in:
+1
-2
@@ -93,11 +93,10 @@ class Command extends Component
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$client = $this->connection->getConnection();
|
$client = $this->connection->getConnection();
|
||||||
if (($prepare = $client->query($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) {
|
foreach ($this->params as $key => $param) {
|
||||||
var_dump($this->sql, $key, $param);
|
|
||||||
$prepare->bindParam($key, $param, PDO::PARAM_STR | PDO::PARAM_INT);
|
$prepare->bindParam($key, $param, PDO::PARAM_STR | PDO::PARAM_INT);
|
||||||
}
|
}
|
||||||
return $prepare->fetch(PDO::FETCH_ASSOC);
|
return $prepare->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|||||||
Reference in New Issue
Block a user