1--TEST-- 2mysqli multi_query, next_result, more_results 3--EXTENSIONS-- 4mysqli 5--SKIPIF-- 6<?php 7require_once 'skipifconnectfailure.inc'; 8?> 9--FILE-- 10<?php 11 require_once 'connect.inc'; 12 13 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 14 $mysql->multi_query('SELECT 1;SELECT 2'); 15 do { 16 $res = $mysql->store_result(); 17 if ($mysql->errno == 0) { 18 while ($arr = $res->fetch_assoc()) { 19 var_dump($arr); 20 } 21 $res->free(); 22 } 23 if (!$mysql->more_results()) { 24 break; 25 } 26 } while (@$mysql->next_result()); 27 $mysql->close(); 28 print "done!"; 29?> 30--EXPECT-- 31array(1) { 32 [1]=> 33 string(1) "1" 34} 35array(1) { 36 [2]=> 37 string(1) "2" 38} 39done! 40