aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/oracle.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/oracle.php')
-rw-r--r--phpBB/includes/db/oracle.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index fc7d177377..09648d9841 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -514,6 +514,39 @@ class dbal_oracle extends dbal
}
}
+ function sql_handle_data($type, $table, $data, $where = '')
+ {
+ if ($type === 'INSERT')
+ {
+ $stmt = oci_parse($this->db_connect_id, "INSERT INTO $table (". implode(', ', array_keys($data)) . ") VALUES (:" . implode(', :', array_keys($data)) . ')');
+ }
+ else
+ {
+ $query = "UPDATE $table SET ";
+
+ $set = array();
+ foreach (array_keys($data) as $key)
+ {
+ $set[] = "$key = :$key";
+ }
+ $query .= implode(', ', $set);
+
+ if ($where !== '')
+ {
+ $query .= $where;
+ }
+
+ $stmt = oci_parse($this->db_connect_id, $query);
+ }
+
+ foreach ($data as $column => $value)
+ {
+ oci_bind_by_name($stmt, ":$column", $data[$column], -1);
+ }
+
+ oci_execute($stmt);
+ }
+
/**
* Build LIKE expression
* @access private