以下的文章主要介绍的是如何用php来对mysql存储过程进行调用,我前几天在一个可信度特别好的网站看见关于php来对mysql存储过程进行调用的资料,觉得挺好,就拿出来供大家分享。
498)this.width=498; onmousewheel=javascript:return big(this) alt=php调用mysql存储过程 src=file:///c:/documents%20and%20settings/administrator/local%20settings/temporary%20internet%20files/content.ie5/xuzim6fk/0416f93099331ba3a9018ee5%5b1%5d.jpg>
nbsp;html public -//w3c//dtd xhtml 1.0 transitional//en http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd> html xmlns=http://www.w3.org/1999/xhtml> head> meta http-equiv=content-type content=text/html; charset=gb2312 /> title>无标题文档title> head> body> table align=center border=1> caption>h3>用户管理h3>caption> tr > td align=center colspan=7> a href=adduser.html>添加记录a> td> tr> tr> td align=center>font style=font-weight: bold; font-size: 12px; font-family: 黑体>姓名font>td> td align=center>font style=font-weight: bold; font-size: 12px; font-family: 黑体>性别font>td> td align=center>font style=font-weight: bold; font-size: 12px; font-family: 黑体>年龄font>td> td align=center>font style=font-weight: bold; font-size: 12px; font-family: 黑体>电话font>td> td align=center>font style=font-weight: bold; font-size: 12px; font-family: 黑体>地址font>td> td align=center colspan=2>font style=font-weight: bold; font-size: 12px; font-family: 黑体>编辑font>td> tr> php
通知服务器客户端可以处理由多语句或者mysql存储过程执行生成的多结果集。当打开client_multi_statements时,这个标志自动的被打开。可以在本表后查看更多关于该标志位的信息。)
define('client_multi_results', 131072); $link = mysql_connect(localhost, root, 123,1,client_multi_results) or die(数据库连接失败: .mysql_error()); $query=mysql_query(call bbs.p_alluserinfo()) or die(query failed: .mysql_error()); if(mysql_num_rows($query)>0) { $info=mysql_fetch_array($query); do { echo tr>; echo td>$info[user_name]td>; echo td>$info[user_sex]td>; echo td>$info[user_age]td>; echo td>$info[user_tel]td>; echo td>$info[user_adderss]td>; echo td>a href='uduser.php?uid=$info[user_id]'>更新a>td>; echo td>a href='deluser.php?uid=$info[user_id]'>删除a>td>; echo tr>; }while($info=mysql_fetch_array($query)); echo table>; } else { echo tr>没有记录tr>table>; } ?> table> body> html>
以上的相关内容就是对如何用php来对mysql存储过程进行调用的介绍,望你能有所收获。
