日期:2014-05-17 浏览次数:20485 次
$user = "scott"; //数据库用户名 $password = "tiger"; //密码 $conn_str = "tnsname"; //连接串(cstr : Connection_STRing) $remote = true //是否远程连接 if ($remote) { $conn = OCILogon($user, $password, $conn_str); } else { $conn = OCILogon($user, $password); } $a='S_a'; $b='S_b'; $c='S_c'; $d='S_d'; $e='S_e'; $sql_sp = "BEGIN PROC_TEST(:a, :b,:c,:d,:e); END;"; //Parse $stmt = OCIParse($conn, $sql_sp); //执行绑定 OCIBindByName($stmt, ":a", $a, 30); OCIBindByName($stmt, ":b", $b, 30); OCIBindByName($stmt, ":c", $c, 30); OCIBindByName($stmt, ":d", $d, 30); OCIBindByName($stmt, ":e", $e, 30); OCIExecute($stmt);
我的异常网推荐解决方案:oracle存储过程,http://www.aiyiweb.com/oracle-develop/177537.html