-
-
//For example, the stored procedure to be called is gxtj(a,b)
- $db=new mysqli("localhost","ssss","aaaaa","bbbb");
- mysqli_query($db,"SET NAMES utf8");
- $result=$db->query("call gxtj($year,$jd)"); // gxtj is the stored procedure name of mysql [color=gray] [/color]
- while( $row = $result->fetch_array(MYSQLI_ASSOC)) //Complete fetching a row from the returned result set
- {
- while ($key=key($row)){ //Get the field names in sequence
- $value=current($row); //Get field values in sequence
- }
- }
-
Copy code
|