标题: php调用存储过程返回结果集,解决错误的方法 [打印本页] 作者: superadmin 时间: 2007-10-4 20:56 标题: php调用存储过程返回结果集,解决错误的方法 php调用存储过程返回结果集,解决can't return a result set in the given context错误的方法:
2)$link = mysql_connect("127.0.0.1", "root", "",1,CLIENT_MULTI_RESULTS) or die("Could not connect: ".mysql_error());
下面就可以正常使用了,以下是例子程序。
<?php
define('CLIENT_MULTI_RESULTS', 131072);
$link = mysql_connect("127.0.0.1", "root", "",1,CLIENT_MULTI_RESULTS) or die("Could not connect: ".mysql_error());
mysql_select_db("vs") or die("Could not select database");
?>