它看起来像在这篇文章中回答:
用mysqli PHP API:
假设sproc myproc(IN i int,OUT j int):
$mysqli = new mysqli( "HOST", "USR", "PWD", "DBNAME" );
$ivalue=1;
$res = $mysqli->multi_query( "CALL myproc($ivalue,@x);SELECT @x" );
if( $res ) {
$results = 0;
do {
if ($result = $mysqli->store_result()) {
printf( "Result #%u:
", ++$results );
while( $row = $result->fetch_row() ) {
foreach( $row as $cell ) echo $cell, " ";
}
$result->close();
if( $mysqli->more_results() ) echo "
";
}
} while( $mysqli->next_result() );
}
$mysqli->close();