From 7c0707607113c13bb273afbb167c0cd2e34d907d Mon Sep 17 00:00:00 2001 From: xzilla Date: Thu, 10 Oct 2002 18:13:00 +0000 Subject: [PATCH] correct display of index properties --- classes/database/Postgres.php | 8 ++++---- public_html/indicies.php | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 1220b904..f34f0945 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: Postgres.php,v 1.18 2002/10/08 21:31:18 xzilla Exp $ + * $Id: Postgres.php,v 1.19 2002/10/10 18:13:00 xzilla Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -18,7 +18,7 @@ class Postgres extends BaseDB { var $vwFields = array('vwname' => 'viewname', 'vwowner' => 'viewowner', 'vwdef' => 'definition'); var $uFields = array('uname' => 'usename', 'usuper' => 'usesuper', 'ucreatedb' => 'usecreatedb', 'uexpires' => 'valuntil'); var $sqFields = array('seqname' => 'relname', 'seqowner' => 'usename', 'lastvalue' => 'last_value', 'incrementby' => 'increment_by', 'maxvalue' => 'max_value', 'minvalue'=> 'min_value', 'cachevalue' => 'cache_value', 'logcount' => 'log_cnt', 'iscycled' => 'is_cycled', 'iscalled' => 'is_called' ); - var $ixFields = array('idxname' => 'relname'); + var $ixFields = array('idxname' => 'relname', 'tabname' => 'tab_name', 'columnname' => 'column_name', 'uniquekey' => 'unique_key', 'primarykey' => 'primary_key'); // Last oid assigned to a system object var $_lastSystemOID = 18539; @@ -670,7 +670,7 @@ class Postgres extends BaseDB { function &getIndex($idxname) { $sql = "SELECT - ic.relname AS index_name, + ic.relname AS relname, bc.relname AS tab_name, ta.attname AS column_name, i.indisunique AS unique_key, @@ -690,7 +690,7 @@ class Postgres extends BaseDB { AND ta.attrelid = i.indrelid AND ta.attnum = i.indkey[ia.attnum-1] ORDER BY - index_name, tab_name, column_name"; + relname, tab_name, column_name"; return $this->selectSet($sql); } diff --git a/public_html/indicies.php b/public_html/indicies.php index 85758b9d..04824fbd 100644 --- a/public_html/indicies.php +++ b/public_html/indicies.php @@ -3,7 +3,7 @@ * FILENAME: index.php * AUTHOR: Ray Hunter * - * $Id: indicies.php,v 1.2 2002/10/08 21:31:18 xzilla Exp $ + * $Id: indicies.php,v 1.3 2002/10/10 18:13:00 xzilla Exp $ */ include_once( '../conf/config.inc.php' ); @@ -37,13 +37,13 @@ function doDefault() while( !$indexs->EOF ) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); - echo "", htmlspecialchars( $indexs->f[$data->sqFields['seqname']]), ""; + echo "", htmlspecialchars( $indexs->f[$data->ixFields['idxname']]), ""; echo ""; - echo "Properties\n"; + echo "Properties\n"; echo ""; - echo "Drop\n"; + echo "Drop\n"; echo ""; - echo "Privileges\n"; + echo "Privileges\n"; $indexs->movenext(); $i++; @@ -77,11 +77,11 @@ function doDefault() echo""; echo ""; echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
$strIndexName$strTabName$strColumnName$strUniqueKey$strPrimaryKey
", $index->f[$data->sqFields['idxname']], "", $index->f[$data->sqFields['tabname']], "", $index->f[$data->sqFields['columnname']], "", $index->f[$data->sqFields['uniquekey']], "", $index->f[$data->sqFields['primarykey']], "", $index->f[$data->ixFields['idxname']], "", $index->f[$data->ixFields['tabname']], "", $index->f[$data->ixFields['columnname']], "", $index->f[$data->ixFields['uniquekey']], "", $index->f[$data->ixFields['primarykey']], "
"; echo "

"; -- 2.39.5