We can now list sequences
authorxzilla <xzilla>
Wed, 25 Sep 2002 22:10:20 +0000 (22:10 +0000)
committerxzilla <xzilla>
Wed, 25 Sep 2002 22:10:20 +0000 (22:10 +0000)
classes/database/Postgres.php
public_html/sequences.php

index d68eb959b9abe2de6e439314858639592e82c9e9..7abbeae7e80634acfba998a1d4efac8cab3732ff 100755 (executable)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres\r
  * Note: This class uses ADODB and returns RecordSets.\r
  *\r
- * $Id: Postgres.php,v 1.10 2002/09/23 06:18:55 chriskl Exp $\r
+ * $Id: Postgres.php,v 1.11 2002/09/25 22:10:20 xzilla Exp $\r
  */\r
 \r
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???\r
@@ -17,6 +17,7 @@ class Postgres extends BaseDB {
        var $tbFields = array('tbname' => 'tablename', 'tbowner' => 'tableowner');\r
        var $vwFields = array('vwname' => 'viewname', 'vwowner' => 'viewowner', 'vwdef' => 'definition');\r
        var $uFields = array('uname' => 'usename', 'usuper' => 'usesuper', 'ucreatedb' => 'usecreatedb', 'uexpires' => 'valuntil');\r
+       var $sqFields = array('seqname' => 'relname');\r
 \r
        // Last oid assigned to a system object\r
        var $_lastSystemOID = 18539;\r
index bb7d9ff8b47d24e2683b8e2d995381fe51a9b1f5..7f91ac027ed8f2b98e125ec2f3a036e83f138ef7 100644 (file)
@@ -3,7 +3,7 @@
  *  FILENAME:   sequence.php
  *  AUTHOR:     Ray Hunter <rhunter@venticon.com>
  *
- *  $Id: sequences.php,v 1.2 2002/07/26 09:03:06 chriskl Exp $
+ *  $Id: sequences.php,v 1.3 2002/09/25 22:10:21 xzilla Exp $
  */
 
 include_once( '../conf/config.inc.php' );
@@ -20,7 +20,7 @@ $PHP_SELF = $_SERVER['PHP_SELF'];
 // {{{ doDefault()
 function doDefault()
 {
-    global $data, $localData, $misc, $database; 
+    global $data, $localData, $misc, $database, $sequences
     global $PHP_SELF;
     global $strNoSequences, $strSequences, $strOwner, $strActions;
 
@@ -33,13 +33,17 @@ function doDefault()
         echo "<table>\n";
         echo "<tr><th class=\"data\">{$strSequences}</th><th class=\"data\">{$strOwner}</th><th colspan=\"4\" class=\"data\">{$strActions}</th>\n";
         $i = 0;
-        /*
+
         while( !$sequences->EOF )
         {
             $id = ( ($i % 2 ) == 0 ? '1' : '2' );
-            //echo "<tr><td class=\"data{$id}", htmlspecialchars( $sequences->f[$data->seqFields['seqname']]), "</td>\n"; 
+            echo "<tr><td class=\"data{$id}\">", htmlspecialchars( $sequences->f[$data->sqFields['seqname']]), "</td><td>Owner</td><td>Actions</td></tr>\n"; 
+
+                       $sequences->movenext();
+                       $i++;
         }
-        */
+
+
         echo "</table>\n";
     }
     else