Update database.oracle.php
This commit is contained in:
parent
8b0ce3d24c
commit
daee072abb
|
@ -6,10 +6,13 @@
|
|||
* @brief Oracle database helper for ReasonableFramework
|
||||
*/
|
||||
|
||||
if(!function_exists("get_db_orable_binded_sql")) {
|
||||
function get_db_orable_binded_sql($sql, $bind) {
|
||||
return get_db_binded_sql($sql, $bind);
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("get_db_oracle_stmt")) {
|
||||
function get_db_oracle_stmt($sql, $bind) {
|
||||
$stmt = NULL;
|
||||
|
||||
|
@ -18,12 +21,14 @@ function get_db_oracle_stmt($sql, $bind) {
|
|||
|
||||
return $stmt;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("exec_db_oracle_connect")) {
|
||||
function exec_db_oracle_connect($host, $port, $user, $password, $options=array()) {
|
||||
$conn = NULL;
|
||||
$envs = array();
|
||||
|
||||
if(!function_exists("oci_connect") {
|
||||
if(!function_exists("oci_connect")) {
|
||||
exit("OCI (Oracle Extension for PHP) not installed!");
|
||||
}
|
||||
|
||||
|
@ -72,7 +77,9 @@ function exec_db_oracle_connect($host, $port, $user, $password, $options=array()
|
|||
|
||||
return $conn;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("exec_db_oracle_fetch_all")) {
|
||||
function exec_db_oracle_fetch_all($sql, $bind, $conn) {
|
||||
$rows = array();
|
||||
|
||||
|
@ -94,7 +101,9 @@ function exec_db_oracle_fetch_all($sql, $bind, $conn) {
|
|||
|
||||
return $rows;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("exec_db_oracle_query")) {
|
||||
function exec_db_oracle_query($sql, $bind, $conn) {
|
||||
$flag = false;
|
||||
|
||||
|
@ -105,3 +114,11 @@ function exec_db_oracle_query($sql, $bind, $conn) {
|
|||
|
||||
return $flag;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("close_db_oracle_connect")) {
|
||||
function close_db_oracle_connect() {
|
||||
$dbc = get_scope("dbc");
|
||||
return oci_close($dbc);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user