网站建设排名公司,怎么做下载网站,做外链一定要淘宝网站吗,工程公司税率是多少php中在同时执行2个存储过程时#xff0c;有一个程序2个储存过程都执行#xff0c;有一个程序只执行第一个调用。2个都执行的调用如下#xff1a;$mydb-query(delete from pinfo where id in( . $id .));SaveLog($Ptype, $_SESSION[usern…php中在同时执行2个存储过程时有一个程序2个储存过程都执行有一个程序只执行第一个调用。2个都执行的调用如下$mydb-query(delete from pinfo where id in( . $id .));SaveLog($Ptype, $_SESSION[username]. Delete .$Ptype. [ID .$id . ]);只有第一个存储过程执行的程序如下$uresult $mydb-query(callAddnews(.$strname.,.$source.,.$strtitle.,.$strContent.,.time().,uresult));SaveLog($Ptype, $_SESSION[username]. Add .$Ptype. [title .$strtitle . ]);$nResult mysql_fetch_row($uresult);$nResult $nResult[0];其中函数SaveLog内容如下Function SaveLog($strMessageType,$strMsg){ mysql_query(callSaveManageLog(.$strMessageType.,.strFilter($strMsg).,.time().)); }把不执行第2个储存过程的echo出来放在mysql里单独是可执行的。那么问题出在那呢mysql_query($command) or die(msyql_error())把mysql_query后加上 or die(msyql_error())显示错误提示Commands out ofsync; you cant run this command now解决如下$mysqli newmysqli(localhost, root, sbqcel, test);$mysqli-multi_query(callAddnews(.$strname.,.$source.,.$strtitle.,.$strContent.,.time().,uresult)); $uresult$mysqli-store_result();$nResult $uresult-fetch_row();$uresult-close();$mysqli-close();SaveLog($Ptype,$_SESSION[username]. Add .$Ptype. [title . $strtitle .]);现在2个存储过程都可以执行了。注意如果第一个调用返回值那么第2个就不能执行这里就要用到mysql的mysqli