handle multiple result sets from procedure

I could not find a way to get more than one result set from calling stored procedure.

I have a stored procedure which will return 2 result sets (2 select statement) and i can get only the first result set from fetchAll().

Is there any way to get the second result set?



238

just foound a way to my question

        $result = $this->db->query("CALL procedure_name($param)");
        $result->setFetchMode(\PDO::FETCH_ASSOC);
        $resultArray=[];
        $resultArray['result1']=$result->fetchAll();
        $result->nextRowset();
        $resultArray['result2']=$result->fetchAll();
        $result->nextRowset();