Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
Add Comment
Please, Sign In to add comment