bool mysqli_next_result ( mysqli $link );
它从mysqli_multi_query()准备下一个输出集。
Sr.No | 参数 & Description |
---|---|
1 |
link 它指定要使用的MySQL连接 |
成功时返回TRUE,失败时返回FALSE。
<?php $connection_mysql=mysqli_connect("localhost","user","password","db"); if (mysqli_connect_errno($connection_mysql)){ echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql="SELECT name FROM emp;SELECT Country FROM emp"; if (mysqli_multi_query($connection_mysql,$sql)){ do{ if ($result=mysqli_store_result($connection_mysql)){ while ($row=mysqli_fetch_row($result)){ print $row[0]; print "\n"; } } }while (mysqli_next_result($connection_mysql)); } mysqli_close($connection_mysql); ?>
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Spring Boot与Kubernetes云原生微服务实践 -〔杨波〕