aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/db')
-rw-r--r--phpBB/db/oracle.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/phpBB/db/oracle.php b/phpBB/db/oracle.php
index c26001efc7..42664ca45d 100644
--- a/phpBB/db/oracle.php
+++ b/phpBB/db/oracle.php
@@ -320,6 +320,40 @@ class sql_db
return false;
}
}
+ function sql_nextid($query_id = 0)
+ {
+ if(!$query_id)
+ {
+ $query_id = $this->query_result;
+ }
+ if($query_id && $this->last_query_text[$query_id] != "")
+ {
+ if( eregi("^(INSERT{1}|^INSERT INTO{1})[[:space:]][\"]?([a-zA-Z0-9\_\-]+)[\"]?", $this->last_query_text[$query_id], $tablename))
+ {
+ $query = "SELECT ".$tablename[2]."_id_seq.currval FROM DUAL";
+ $stmt = OCIParse($this->db_connect_id, $query);
+ OCIExecute($stmt);
+ $temp_result = @OCIFetchInto($stmt, $temp_result, OCI_ASSOC);
+ if($temp_result)
+ {
+ return $temp_result['CURRVAL'];
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
function sql_nextid()
{
if($this->db_connect_id)