时间:2021-07-01 10:21:17 帮助过:14人阅读
- $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);<br><b>我的异常网推荐解决方案:</b>oracle存储过程,http://www.myexception.cn/oracle-develop/177537.html