1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Removed set_db and added affectedrows

git-svn-id: file:///svn/phpbb/trunk@109 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2001-03-20 15:19:20 +00:00
parent bcf7d2b674
commit 1fbbc382cc
5 changed files with 82 additions and 72 deletions

View File

@@ -92,40 +92,6 @@ class sql_db
//
// Other base methods
//
function sql_setdb($database)
{
if($this->db_connect_id)
{
if($this->query_result)
{
@pg_freeresult($this->query_result);
unset($this->query_result);
unset($this->row);
}
$result = @pg_close($this->db_connect_id);
if($result)
{
$this->dbname = $database;
$make_connect = $this->connect_string . "dbname=$database";
if($this->persistency)
{
$this->db_connect_id = @pg_pconnect($make_connect);
}
else
{
$this->db_connect_id = @pg_connect($make_connect);
}
}
}
if($this->db_connect_id)
{
return $this->db_connect_id;
}
else
{
return false;
}
}
function sql_close()
{
if($this->db_connect_id)
@@ -192,6 +158,22 @@ class sql_db
return false;
}
}
function sql_affectedrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = @pg_cmdtuples($query_id);
return $result;
}
else
{
return false;
}
}
function sql_numfields($query_id = 0)
{
if(!$query_id)