Home >Backend Development >PHP Tutorial >PHP调用MYSQL存储过程的有关问题

PHP调用MYSQL存储过程的有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:44:52977browse

PHP调用MYSQL存储过程的问题
以下是代码:
PHP:
  $dbcon=mysql_connect("localhost","root","sony") or die("數據庫無法聯接 ");
  mysql_select_db("dbname") or die("數據庫無法聯接 ".$db);
mysql_query("call p_ss()",$dbcon)or die("無法聯接 ");
mysql_close($dbcon);
?>

MYSQL:
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_cong_ss`(in idd int )
BEGIN
  update bookuser
  set id=idd;
  select idd;
END
MYSQL在 query browser 上执行的OK的。 但PHP调用时一直是无法联接,请教各位?

------解决方案--------------------
定义的名字是 p_cong_ss
访问的名字是 p_ss

何况还需要传递一个参数
------解决方案--------------------
没看出是啥问题
------解决方案--------------------
输出错误内容看看,有什么提示

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn