Incrementally use ->fields for recordsets, ->f is not supported by upstream adodb.
authorsoranzo <soranzo>
Wed, 10 Jan 2007 02:01:17 +0000 (02:01 +0000)
committersoranzo <soranzo>
Wed, 10 Jan 2007 02:01:17 +0000 (02:01 +0000)
classes/database/ADODB_base.php
classes/database/Postgres71.php
classes/database/Postgres72.php
classes/database/Postgres73.php
classes/database/Postgres74.php

index 1ee6a48ad33542611743e490058babf65d60d1dc..0164b8db9ac8ca8c3e194c8ebe024c8215a70568 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * Parent class of all ADODB objects.
  *
- * $Id: ADODB_base.php,v 1.21 2005/05/25 04:33:23 chriskl Exp $
+ * $Id: ADODB_base.php,v 1.22 2007/01/10 02:01:17 soranzo Exp $
  */
 
 include_once('./libraries/errorhandler.inc.php');
@@ -117,7 +117,7 @@ class ADODB_base {
                if (!$rs) return $this->conn->ErrorNo();
                elseif ($rs->RecordCount() == 0) return -1;
 
-               return $rs->f[$field];
+               return $rs->fields[$field];
        }
 
        /**
index bba56e385c8120fa3d1eea0b1e24f7611a84897f..c22502192e56ce49e4d53964fab59f76e1e0affb 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres71.php,v 1.74 2005/10/18 03:45:16 chriskl Exp $
+ * $Id: Postgres71.php,v 1.75 2007/01/10 02:01:17 soranzo Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -197,7 +197,7 @@ class Postgres71 extends Postgres {
                // Get the minimum value of the sequence
                $seq = $this->getSequence($sequence);
                if ($seq->recordCount() != 1) return -1;
-               $minvalue = $seq->f['min_value'];
+               $minvalue = $seq->fields['min_value'];
 
                /* This double-cleaning is deliberate */
                $this->fieldClean($sequence);
index 8a28deae2aa0602028e1b60ff971f3a35a017eb4..b6c2999b5229375cda62b58e5d023a57682c86c4 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres72.php,v 1.87 2006/12/28 05:03:41 xzilla Exp $
+ * $Id: Postgres72.php,v 1.88 2007/01/10 02:01:17 soranzo Exp $
  */
 
 
@@ -169,8 +169,8 @@ class Postgres72 extends Postgres71 {
                $rs = $this->selectSet($sql);
                if ($rs->recordCount() != 1) return -99;
                else {
-                       $rs->f['relhasoids'] = $this->phpBool($rs->f['relhasoids']);
-                       return $rs->f['relhasoids'];
+                       $rs->fields['relhasoids'] = $this->phpBool($rs->fields['relhasoids']);
+                       return $rs->fields['relhasoids'];
                }
        }
 
index 0db00e4a66892d58d61ca594c26e75c981228d50..52661de9411e4fe713c622d5af1a36ecfdb9a4b3 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres73.php,v 1.160 2006/09/30 17:30:56 xzilla Exp $
+ * $Id: Postgres73.php,v 1.161 2007/01/10 02:01:17 soranzo Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -321,8 +321,8 @@ class Postgres73 extends Postgres72 {
                $rs = $this->selectSet($sql);
                if ($rs->recordCount() != 1) return -99;
                else {
-                       $rs->f['relhasoids'] = $this->phpBool($rs->f['relhasoids']);
-                       return $rs->f['relhasoids'];
+                       $rs->fields['relhasoids'] = $this->phpBool($rs->fields['relhasoids']);
+                       return $rs->fields['relhasoids'];
                }
        }
 
@@ -355,7 +355,7 @@ class Postgres73 extends Postgres72 {
                else {
                        $temp = array();
                        while (!$rs->EOF) {
-                               $temp[$rs->f['attnum']] = $rs->f['attname'];
+                               $temp[$rs->fields['attnum']] = $rs->fields['attname'];
                                $rs->moveNext();
                        }
                        return $temp;
@@ -396,7 +396,7 @@ class Postgres73 extends Postgres72 {
                }
                // Otherwise find the names of the keys
                else {
-                       $attnames = $this->getAttributeNames($oldtable, explode(' ', $rs->f['indkey']));
+                       $attnames = $this->getAttributeNames($oldtable, explode(' ', $rs->fields['indkey']));
                        if (!is_array($attnames)) {
                                $this->rollbackTransaction();
                                return -1;
@@ -667,7 +667,7 @@ class Postgres73 extends Postgres72 {
                // Get the minimum value of the sequence
                $seq = $this->getSequence($sequence);
                if ($seq->recordCount() != 1) return -1;
-               $minvalue = $seq->f['min_value'];
+               $minvalue = $seq->fields['min_value'];
 
                /* This double-cleaning is deliberate */
                $this->fieldClean($sequence);
index a900132dba29bee3292faf0e86d989a214afabdd..b15998bc0e64c34598ff160e1235f8642f60a4d2 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres74.php,v 1.55 2006/09/24 23:42:41 xzilla Exp $
+ * $Id: Postgres74.php,v 1.56 2007/01/10 02:01:17 soranzo Exp $
  */
 
 include_once('./classes/database/Postgres73.php');
@@ -116,7 +116,7 @@ class Postgres74 extends Postgres73 {
                }
                // Otherwise find the names of the keys
                else {
-                       $attnames = $this->getAttributeNames($oldtable, explode(' ', $rs->f['indkey']));
+                       $attnames = $this->getAttributeNames($oldtable, explode(' ', $rs->fields['indkey']));
                        if (!is_array($attnames)) {
                                $this->rollbackTransaction();
                                return -1;
@@ -575,11 +575,11 @@ class Postgres74 extends Postgres73 {
                $this->clean($cycledvalue);
 
                $sql = "ALTER SEQUENCE \"{$sequence}\"";
-               if ($increment != '' && $increment != $data->f['increment_by']) $sql .= " INCREMENT {$increment}";
-               if ($minvalue != '' && $minvalue != $data->f['min_value']) $sql .= " MINVALUE {$minvalue}";
-               if ($maxvalue != '' && $maxvalue != $data->f['max_value']) $sql .= " MAXVALUE {$maxvalue}";
-               if ($startvalue != '' && $startvalue != $data->f['last_value']) $sql .= " START {$startvalue}";
-               if ($cachevalue != '' && $cachevalue != $data->f['cache_value']) $sql .= " CACHE {$cachevalue}";
+               if ($increment != '' && $increment != $data->fields['increment_by']) $sql .= " INCREMENT {$increment}";
+               if ($minvalue != '' && $minvalue != $data->fields['min_value']) $sql .= " MINVALUE {$minvalue}";
+               if ($maxvalue != '' && $maxvalue != $data->fields['max_value']) $sql .= " MAXVALUE {$maxvalue}";
+               if ($startvalue != '' && $startvalue != $data->fields['last_value']) $sql .= " START {$startvalue}";
+               if ($cachevalue != '' && $cachevalue != $data->fields['cache_value']) $sql .= " CACHE {$cachevalue}";
                // toggle cycle yes/no
                $sql .= (!$cycledvalue ? ' NO ' : '') . " CYCLE";