aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/firebird.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/firebird.php')
-rw-r--r--phpBB/includes/db/firebird.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index afb649a4f4..48eb22046e 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -352,6 +352,37 @@ class dbal_firebird extends dbal
}
}
+ function sql_handle_data($type, $table, $data, $where = '')
+ {
+ if ($type == 'INSERT')
+ {
+ $stmt = ibase_prepare($this->db_connect_id, "INSERT INTO $table (". implode(', ', array_keys($data)) . ") VALUES (" . substr(str_repeat('?, ', sizeof($data)) ,0, -1) . ')');
+ }
+ else
+ {
+ $query = "UPDATE $table SET ";
+
+ $set = array();
+ foreach (array_keys($data) as $key)
+ {
+ $set[] = "$key = ?";
+ }
+ $query .= implode(', ', $set);
+
+ if ($where !== '')
+ {
+ $query .= $where;
+ }
+
+ $stmt = ibase_prepare($this->db_connect_id, $query);
+ }
+
+ // get the stmt onto the top of the function arguments
+ array_unshift($data, $stmt);
+
+ call_user_func_array('ibase_execute', $data);
+ }
+
/**
* Build LIKE expression
* @access private