我正在尝试调用过程,但我收到了我提到的错误。
例外' PDOException'消息' SQLSTATE [HY000]:常规错误: 2053
以下行是指向错误的内容。
$ result_new = $ this-> result-> fetchAll(PDO :: FETCH_CLASS);
public function getProcResult($returnKeys = array() ){
$rows = array();
$this->result = $this->selectprc();
$columns = array();
$key_count = 0;
$first_call = true;
do{
$result_new = $this->result->fetchAll(PDO::FETCH_CLASS);//this is where i am getting the error
if(isset($returnKeys[$key_count])) {
if (count($result_new)) {
//print_r($result_new);
//echo $returnKeys[$key_count];
//echo '<br>=========<br>';
$this->data[$returnKeys[$key_count]] = $result_new;
} else {
$this->data[$returnKeys[$key_count]] = array();
}
}
$key_count++;
}while($this->result->nextRowset());
do{
if(isset($returnKeys[$key_count])) {
$this->data[$returnKeys[$key_count]] = array();
}
$key_count++;
}while($key_count<count($returnKeys));
return $this;
}
protected function selectprc(){
$pdo = DB::connection($this->connection)->getPdo();
DB::connection()->logQuery($this->query,array());
return $pdo->query($this->query);
}