实例:
multi_query($query)) {
do {
/* 获取第一个结果集 */
if ($result = $mysqli->store_result()) {
while ($row = $result->fetch_row()) {
printf("%s\n", $row[0]);
}
$result->free();
}
/* 检查一个多查询是否有更多的结果 */
if ($mysqli->more_results()) {
printf("-----------------\n");
}
//准备下一个结果集
} while ($mysqli->next_result());
}
/* close connection */
$mysqli->close();
?>