mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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:
parent
8276d5728c
commit
6e9bc6b0fc
4 changed files with 42 additions and 34 deletions
|
@ -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,7 +221,8 @@ 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]);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,11 +86,15 @@ if(!$result)
|
|||
|
||||
$logged_online = 0;
|
||||
$guests_online = 0;
|
||||
while($row = $db->sql_fetchrow($result))
|
||||
|
||||
$row = $db->sql_fetchrowset($result);
|
||||
$num_rows = $db->sql_numrows($result);
|
||||
for($x = 0; $x < $num_rows; $x++)
|
||||
{
|
||||
if($row['session_logged_in'])
|
||||
|
||||
if($row[$x]['session_logged_in'])
|
||||
{
|
||||
$userlist_ary[] = "<a href=\"".append_sid("profile." . $phpEx . "?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . "\">" . $row['username'] . "</a>";
|
||||
$userlist_ary[] = "<a href=\"".append_sid("profile." . $phpEx . "?mode=viewprofile&" . POST_USERS_URL . "=" . $row[$x]['user_id']) . "\">" . $row[$x]['username'] . "</a>";
|
||||
$logged_online++;
|
||||
}
|
||||
else
|
||||
|
@ -98,6 +102,7 @@ while($row = $db->sql_fetchrow($result))
|
|||
$guests_online++;
|
||||
}
|
||||
}
|
||||
|
||||
$userlist = "";
|
||||
for($i = 0; $i < $logged_online; $i++)
|
||||
{
|
||||
|
|
|
@ -59,6 +59,7 @@ function session_begin($user_id, $user_ip, $page_id, $session_length, $login = 0
|
|||
{
|
||||
error_die(SQL_QUERY, "Couldn't obtain ban information.", __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
$ban_info = $db->sql_fetchrow($result);
|
||||
|
||||
//
|
||||
|
@ -327,6 +328,7 @@ function session_pagestart($user_ip, $thispage_id, $session_length)
|
|||
error_die(SESSION_CREATE);
|
||||
}
|
||||
}
|
||||
|
||||
$userdata = $db->sql_fetchrow($result);
|
||||
|
||||
if($userdata['user_autologin_key'])
|
||||
|
|
Loading…
Add table
Reference in a new issue