1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > php调用存储过程返回结果集 解决cant return a result set in the given context错误办法

php调用存储过程返回结果集 解决cant return a result set in the given context错误办法

时间:2023-06-14 18:19:57

相关推荐

php调用存储过程返回结果集 解决cant return a result set in the given context错误办法

后端开发|php教程

php调用存储过程返回结果集,解决cant return a result set in the given conte

后端开发-php教程

apache源码包下载地址,ubuntu用apk,修改tomcat启动项目,python爬虫故事,php初级程序员工资,seo推广公司选择兴田德润lzw

需要php调用存储过程,返回一个结果集,发现很困难,找了半天,终于在老外的论坛上找到解决方案,这里本地化一下。

僵尸网络源码,ubuntu卸载usb驱动,tomcat失败原因怎么查看,字节反爬虫,html如何链接php页面,装修 seolzw

关键就是两点

cdn网站源码程序,vscode写作插件,ubuntu查询ip,tomcat日志分析工具,sqlite的缺点,网页设计方法,access 数据库在下无法连接,前段时间公司网页打开不受影响 这段时间非常慢 服务器在香港,discuz 百度分享插件,jui 前端开发框架,朋友圈爬虫,php的源码,seo入门教程,springboot高并发容器,git 切换标签,网站模板 阿里,微信公众号网页版模板下载,joomla 使用模板,网站后台查询软件,淘宝页面特效,人事管理系统vfp,qt vs 五子棋程序下载lzw

1)define(‘CLIENT_MULTI_RESULTS’, 131072);

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”);

?>

<?php

$result = mysql_query(“call get_news_from_class_id(2)”) or die(“Query failed:” .mysql_error());

while($row = mysql_fetch_array($result, MYSQL_ASSOC))

{

$line = ‘

‘.$row[“title”].(‘.$row[“page_time”].’)’.’

</t

r>’;

echo $line;

PRintf(“\n”);

}

mysql_free_result($result);

?>

<?php

mysql_close($link);

?>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。