-
-
//比如要调用的存储过程为gxtj(a,b)
- $db=new mysqli("localhost","ssss","aaaaa","bbbb");
- mysqli_query($db,"SET NAMES utf8");
- $result=$db->query("call gxtj($year,$jd)"); // gxtj是mysql的存储过程名称 [color=gray][/color]
- while( $row = $result->fetch_array(MYSQLI_ASSOC)) //完成从返回结果集中取出一行
- {
- while ($key=key($row)){ //依次取得字段名
- $value=current($row); //依次取得字段值
- }
- }
-
复制代码
|