diff options
author | David M <davidmj@users.sourceforge.net> | 2006-03-18 06:39:47 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-03-18 06:39:47 +0000 |
commit | 593ab697a0be41b0b04d64b00e8e3ec767a9f083 (patch) | |
tree | 76e215420d011b516e0386b55a2ae36316e0e59a /phpBB/includes/db/postgres.php | |
parent | f2cc5c093dd6a040d7a6ef6a4358dbfe0b70ff88 (diff) | |
download | forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar.gz forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar.bz2 forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar.xz forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.zip |
- Cleaned up some compress stuff
- Replaced deprecated functions in the PostrgreSQL DBAL
- Added an undefined constant during install
- Oh, and we now have backups :D We currently work with all the MySQL flavors, PostgreSQL and SQLite...
git-svn-id: file:///svn/phpbb/trunk@5647 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/postgres.php')
-rw-r--r-- | phpBB/includes/db/postgres.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index d7cfa1ba10..75d83aecd6 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -85,22 +85,22 @@ class dbal_postgres extends dbal switch ($status) { case 'begin': - $result = @pg_exec($this->db_connect_id, 'BEGIN'); + $result = @pg_query($this->db_connect_id, 'BEGIN'); $this->transaction = true; break; case 'commit': - $result = @pg_exec($this->db_connect_id, 'COMMIT'); + $result = @pg_query($this->db_connect_id, 'COMMIT'); $this->transaction = false; if (!$result) { - @pg_exec($this->db_connect_id, 'ROLLBACK'); + @pg_query($this->db_connect_id, 'ROLLBACK'); } break; case 'rollback': - $result = @pg_exec($this->db_connect_id, 'ROLLBACK'); + $result = @pg_query($this->db_connect_id, 'ROLLBACK'); $this->transaction = false; break; @@ -207,7 +207,7 @@ class dbal_postgres extends dbal $query_id = $this->query_result; } - return ($query_id) ? @pg_numrows($query_id) : false; + return ($query_id) ? @pg_num_rows($query_id) : false; } /** @@ -289,14 +289,14 @@ class dbal_postgres extends dbal if (preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text, $tablename)) { $query = "SELECT currval('" . $tablename[1] . "_id_seq') AS last_value"; - $temp_q_id = @pg_exec($this->db_connect_id, $query); + $temp_q_id = @pg_query($this->db_connect_id, $query); if (!$temp_q_id) { return false; } $temp_result = @pg_fetch_assoc($temp_q_id, NULL); - @pg_freeresult($query_id); + @pg_free_result($query_id); return ($temp_result) ? $temp_result['last_value'] : false; } @@ -318,7 +318,7 @@ class dbal_postgres extends dbal if (isset($this->open_queries[(int) $query_id])) { unset($this->open_queries[(int) $query_id]); - return @pg_freeresult($query_id); + return @pg_free_result($query_id); } } @@ -367,12 +367,12 @@ class dbal_postgres extends dbal $endtime = explode(' ', microtime()); $endtime = $endtime[0] + $endtime[1]; - $result = @pg_exec($this->db_connect_id, $query); + $result = @pg_query($this->db_connect_id, $query); while ($void = @pg_fetch_assoc($result, NULL)) { // Take the time spent on parsing rows into account } - @pg_freeresult($result); + @pg_free_result($result); $splittime = explode(' ', microtime()); $splittime = $splittime[0] + $splittime[1]; |