From eb5b9bfb0718eb4d960ff2555d6084263750d874 Mon Sep 17 00:00:00 2001 From: uid29890 Date: Thu, 5 Jul 2001 00:47:03 +0000 Subject: Started on moderator control panel code. Main layout is started, no functionality yet git-svn-id: file:///svn/phpbb/trunk@561 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/db/oracle.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'phpBB/db') 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) -- cgit v1.2.1