1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Working on getting Oracle functional. Almost there, need to deal with the 'AUTO INCREMENT' issue

git-svn-id: file:///svn/phpbb/trunk@520 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
James Atkinson
2001-06-21 03:20:37 +00:00
parent 8276d5728c
commit 6e9bc6b0fc
4 changed files with 42 additions and 34 deletions

View File

@@ -45,11 +45,11 @@ class sql_db
if($this->persistency)
{
$this->db_connect_id = OCIPLogon($this->user, $this->password, $this->server);
$this->db_connect_id = @OCIPLogon($this->user, $this->password, $this->server);
}
else
{
$this->db_connect_id = OCINLogon($this->user, $this->password, $this->server);
$this->db_connect_id = @OCINLogon($this->user, $this->password, $this->server);
}
if($this->db_connect_id)
{
@@ -70,9 +70,9 @@ class sql_db
{
if($this->query_result)
{
OCIFreeStatement($this->query_result);
@OCIFreeStatement($this->query_result);
}
$result = OCILogoff($this->db_connect_id);
$result = @OCILogoff($this->db_connect_id);
return $result;
}
else
@@ -107,8 +107,8 @@ class sql_db
}
}
$this->query_result = OCIParse($this->db_connect_id, $query);
$success = OCIExecute($this->query_result);
$this->query_result = @OCIParse($this->db_connect_id, $query);
$success = @OCIExecute($this->query_result);
}
if($success)
{
@@ -133,10 +133,10 @@ class sql_db
}
if($query_id)
{
$result = OCIFetchStatement($query_id, $this->rowset);
$result = @OCIFetchStatement($query_id, $this->rowset);
// OCIFetchStatment kills our query result so we have to execute the statment again
// if we ever want to use the query_id again.
OCIExecute($query_id);
@OCIExecute($query_id);
return $result;
}
else
@@ -168,7 +168,7 @@ class sql_db
}
if($query_id)
{
$result = OCINumCols($query_id);
$result = @OCINumCols($query_id);
return $result;
}
else
@@ -187,7 +187,7 @@ class sql_db
}
if($query_id)
{
$result = strtolower(OCIColumnName($query_id, $offset));
$result = strtolower(@OCIColumnName($query_id, $offset));
return $result;
}
else
@@ -205,7 +205,7 @@ class sql_db
}
if($query_id)
{
$result = OCIColumnType($query_id, $offset);
$result = @OCIColumnType($query_id, $offset);
return $result;
}
else
@@ -221,12 +221,13 @@ class sql_db
}
if($query_id)
{
$result = OCIFetchInto($query_id, &$this->row[$query_id], OCI_ASSOC);
$result = @OCIFetchInto($query_id, &$this->row[$query_id], OCI_ASSOC);
for($i = 0; $i < count($this->row[$query_id]); $i++)
{
list($key, $val) = each($this->row[$query_id]);
$return_arr[strtolower($key)] = $val;
}
{
list($key, $val) = each($this->row[$query_id]);
$return_arr[strtolower($key)] = $val;
}
$this->row[$query_id] = $return_arr;
return $this->row[$query_id];
}
@@ -245,11 +246,11 @@ class sql_db
}
if($query_id)
{
$rows = OCIFetchStatement($query_id, $results);
OCIExecute($query_id);
$rows = @OCIFetchStatement($query_id, $results);
@OCIExecute($query_id);
for($i = 0; $i <= $rows; $i++)
{
OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS);
@OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS);
for($j = 0; $j < count($tmp_result); $j++)
{
@@ -276,20 +277,20 @@ class sql_db
if($rownum > -1)
{
// Reset the internal rownum pointer.
OCIExecute($query_id);
@OCIExecute($query_id);
for($i = 0; $i < $rownum; $i++)
{
// Move the interal pointer to the row we want
OCIFetch($query_id);
@OCIFetch($query_id);
}
// Get the field data.
$result = OCIResult($query_id, strtoupper($field));
$result = @OCIResult($query_id, strtoupper($field));
}
else
{
// The internal pointer should be where we want it
// so we just grab the field out of the current row.
$result = OCIResult($query_id, strtoupper($field));
$result = @OCIResult($query_id, strtoupper($field));
}
return $result;
}
@@ -306,12 +307,12 @@ class sql_db
}
if($query_id)
{
OCIExecute($query_id);
@OCIExecute($query_id);
for($i = 0; $i < $rownum; $i++)
{
OCIFetch($query_id);
@OCIFetch($query_id);
}
$result = OCIFetch($query_id);
$result = @OCIFetch($query_id);
return $result;
}
else
@@ -339,7 +340,7 @@ class sql_db
}
if($query_id)
{
$result = OCIFreeStatement($query_id);
$result = @OCIFreeStatement($query_id);
return $result;
}
else
@@ -353,7 +354,7 @@ class sql_db
{
$query_id = $this->query_result;
}
$result = OCIError($query_id);
$result = @OCIError($query_id);
return $result;
}