Update oracle.php
This commit is contained in:
parent
89e10895b4
commit
125dd44bbc
|
|
@ -10,6 +10,15 @@ function get_db_orable_binded_sql($sql, $bind) {
|
||||||
return get_db_binded_sql($sql, $bind);
|
return get_db_binded_sql($sql, $bind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_db_oracle_stmt($sql, $bind) {
|
||||||
|
$stmt = NULL;
|
||||||
|
|
||||||
|
$sql = get_db_orable_binded_sql($sql, $bind);
|
||||||
|
$stmt = oci_parse($conn, $sql);
|
||||||
|
|
||||||
|
return $stmt;
|
||||||
|
}
|
||||||
|
|
||||||
function exec_db_oracle_connect($host, $port, $user, $password, $options=array()) {
|
function exec_db_oracle_connect($host, $port, $user, $password, $options=array()) {
|
||||||
$conn = NULL;
|
$conn = NULL;
|
||||||
$envs = array();
|
$envs = array();
|
||||||
|
|
@ -74,8 +83,7 @@ function exec_db_oracle_fetch_all($sql, $bind, $conn) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = get_db_orable_binded_sql($sql, $bind);
|
$stmt = get_db_oracle_stmt($sql, $bind);
|
||||||
$stmt = oci_parse($conn, $sql);
|
|
||||||
oci_execute($stmt);
|
oci_execute($stmt);
|
||||||
|
|
||||||
while($row = oci_fetch_assoc($stmt)) {
|
while($row = oci_fetch_assoc($stmt)) {
|
||||||
|
|
@ -86,3 +94,14 @@ function exec_db_oracle_fetch_all($sql, $bind, $conn) {
|
||||||
|
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function exec_db_oracle_query($sql, $bind, $conn) {
|
||||||
|
$flag = false;
|
||||||
|
|
||||||
|
$stmt = get_db_oracle_stmt($sql, $bind);
|
||||||
|
$flag = oci_execute($stmt);
|
||||||
|
|
||||||
|
oci_free_statement($stmt);
|
||||||
|
|
||||||
|
return $flag;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user