<?php
header("Content-type: text/html;charset=utf-8");//防止乱码
//获取链接
$conn=mysqli_connectDb();
if(!$conn){
//mysql_error()是返回mysql的上一次操作
die("连接失败".mysqli_error());
}else{
//echo '连接成功!<br/>';
}
//选择对应的数据库
mysqli_select_db($conn,"testDB");
//设置操作编码
mysqli_set_charset($conn,'utf8');
$sql = "CALL test_process()";
$FirstResult = mysqli_query($conn,$sql) or die(mysqli_error($conn));
// 释放剩下的结果集,否则执行 mysqli_query 报错
// Commands out of sync; you can't run this command now
mysqli_free_result(FirstResult);
mysqli_next_result($conn);
if($res = mysqli_store_result($conn))
{
$res->free();
};
// 执行二次查询 mysqli_query
mysqli_close($conn);
?>