Welcome Guest, Not a member yet? Register   Sign In
Multi ResultSet store procedure: introducing next ResultSet method
#1

(This post was last modified: 12-16-2021, 07:22 AM by webpd.)

Hi,
I need a possibility to access to next resultset when I'm calling a store procedure that return a multiple resultset.
I sudgest to insert into system/Database/BaseResult.php this method:

abstract protected function nextResultset(): bool;

This method return false if there aren't other resultset
Then in each DB driver that implements this class is necessary to implement this method.

For example in SQLSRV/Result.php:
public function nextResultset(): bool
{
    $this->resultObject=[];
    $this->resultArray=[];
    return sqlsrv_next_result($this->resultID) ?? false;

}

For example in MySQLi/Result.php:

public function nextResultset(): bool
{
    $this->resultObject=[];
    $this->resultArray=[];
    return $this->resultID->next_result() ?? false;

}



Is possible to insert this method in next release?

Thanks
Andrea
Reply


Messages In This Thread
Multi ResultSet store procedure: introducing next ResultSet method - by webpd - 12-02-2021, 01:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB