aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorthe_systech <the_systech@users.sourceforge.net>2002-01-11 17:01:31 +0000
committerthe_systech <the_systech@users.sourceforge.net>2002-01-11 17:01:31 +0000
commit38e1ea8db7a3f1464ba1e54016b0d3cebd1fb499 (patch)
treee3f219aba94c96cd808bb2a8cdacac06a595620d /phpBB
parent0ff22ee594a804c0e9eb05fdd1f79636298af779 (diff)
downloadforums-38e1ea8db7a3f1464ba1e54016b0d3cebd1fb499.tar
forums-38e1ea8db7a3f1464ba1e54016b0d3cebd1fb499.tar.gz
forums-38e1ea8db7a3f1464ba1e54016b0d3cebd1fb499.tar.bz2
forums-38e1ea8db7a3f1464ba1e54016b0d3cebd1fb499.tar.xz
forums-38e1ea8db7a3f1464ba1e54016b0d3cebd1fb499.zip
Fix for various postgres bugs
git-svn-id: file:///svn/phpbb/trunk@1846 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/admin/admin_db_utilities.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/admin/admin_db_utilities.php b/phpBB/admin/admin_db_utilities.php
index 657d2ae022..580ef6c4fa 100644
--- a/phpBB/admin/admin_db_utilities.php
+++ b/phpBB/admin/admin_db_utilities.php
@@ -96,7 +96,7 @@ function pg_get_sequences($crlf, $backup_type)
while($i_seq < $num_seq)
{
- $row = sql_fetchrow($seq);
+ $row = $db->sql_fetchrow($seq);
$sequence = $row['relname'];
$get_props_sql = "SELECT * FROM $sequence";
@@ -137,7 +137,7 @@ function pg_get_sequences($crlf, $backup_type)
//
// This function returns, will return the table def's for postgres...
//
-function get_table_def_postgres($table, $crlf)
+function get_table_def_postgresql($table, $crlf)
{
global $drop, $db;
@@ -146,12 +146,12 @@ function get_table_def_postgres($table, $crlf)
// Get a listing of the fields, with their associated types, etc.
//
- $field_query = "SELECT a.attnum, a.attname AS field, t.typename as type, a.attlen AS length, a.atttypmod as lengthvar, a.attnotnull as notnull
+ $field_query = "SELECT a.attnum, a.attname AS field, t.typname as type, a.attlen AS length, a.atttypmod as lengthvar, a.attnotnull as notnull
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = '$table'
AND a.attnum > 0
AND a.attrelid = c.oid
- AND a.attypid = t.oid
+ AND a.atttypid = t.oid
ORDER BY a.attnum";
$result = $db->sql_query($field_query);
@@ -463,7 +463,7 @@ function get_table_def_mysql($table, $crlf)
//
// Here is the function for postgres...
//
-function get_table_content_postgres($table, $handler)
+function get_table_content_postgresql($table, $handler)
{
global $db;
@@ -488,7 +488,7 @@ function get_table_content_postgres($table, $handler)
$iRec = 0;
- while($row = $db->fetchrow($result))
+ while($row = $db->sql_fetchrow($result))
{
unset($schema_vals);
unset($schema_fields);
@@ -811,7 +811,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
echo "#\n# DATE : " . gmdate("d-m-Y H:i:s", time()) . " GMT\n";
echo "#\n";
- if(SQL_LAYER == 'postgres')
+ if(SQL_LAYER == 'postgresql')
{
echo "\n" . pg_get_sequences("\n", $backup_type);
}
@@ -967,7 +967,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
$result = $db->sql_query($sql);
- if(!$result && ( !(SQL_LAYER == 'postgres' && eregi("drop table", $sql) ) ) )
+ if(!$result && ( !(SQL_LAYER == 'postgresql' && eregi("drop table", $sql) ) ) )
{
//include('page_header_admin.'.$phpEx);
// echo "~~$sql~~";