php调用oracle存储

//todo 调用oracle 存储
$config = //数据库配置文件 里面包含 用户密码和host和端口以及dbname $conn = oci_connect($config['username'], $config['password'], "(DEscriptION=(ADDRESS=(PROTOCOL =TCP)(HOST=" . $config['host'] . ")(PORT = " . $config['port'] . "))(CONNECT_DATA =(SID=" . $config['dbname'] . ")))");
//若是本机上的数据库,可直接用PDO("oci:dbname=数据库",$db_username,$db_password);
$sql = "BEGIN pkg_ers_certificate.p_s_certificate_control(:id,:type,:message); END;";//(会计期:201612,凭证类型)
$stmt = oci_parse($conn, $sql); // Bind the input parameter
oci_bind_by_name($stmt, ':id', $id, 32);
oci_bind_by_name($stmt, ':type', $type, 32);
oci_bind_by_name($stmt, ':message', $message, 32);
$id = implode(',',$params['id']);
$type = trim($params['type']);
oci_execute($stmt);
return $message;
上一篇:easyui placeholder 解决方案


下一篇:Android——开源框架Universal-Image-Loader + Fragment使用+轮播广告