From 7df25eb679f36f1d730ccba14e0d9da43fd3e5db Mon Sep 17 00:00:00 2001 From: soranzo Date: Wed, 19 May 2004 01:28:34 +0000 Subject: [PATCH] Move clusterIndex() to Postgres.php and drop Analyze from it. Add doReindex() + let doClusterIndex also 7.0-7.2 (only can't be seen if the index is clustered) in constraints.php and indexes.php . Really add Recluster (for >= 7.4), Reindex, Full and Freeze Vacuum (for >=7.2) in database classes and in database.php. Additional check in getLinkingKeys(). Typo fixes. --- classes/database/BaseDB.php | 9 +++- classes/database/Postgres.php | 62 +++++++++++++++++++----- classes/database/Postgres72.php | 23 ++++++++- classes/database/Postgres73.php | 86 ++++++++++++--------------------- classes/database/Postgres74.php | 22 ++++++++- constraints.php | 66 ++++++++++++++++--------- database.php | 34 +++++++------ indexes.php | 52 +++++++++++++------- 8 files changed, 229 insertions(+), 125 deletions(-) diff --git a/classes/database/BaseDB.php b/classes/database/BaseDB.php index 6d2b595e..16804ddd 100644 --- a/classes/database/BaseDB.php +++ b/classes/database/BaseDB.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: BaseDB.php,v 1.45 2004/05/14 07:56:37 chriskl Exp $ + * $Id: BaseDB.php,v 1.46 2004/05/19 01:28:34 soranzo Exp $ */ include_once('./classes/database/ADODB_base.php'); @@ -255,8 +255,9 @@ class BaseDB extends ADODB_base { function hasSchemas() { return false; } function hasConversions() { return false; } function hasGrantOption() { return false; } - function hasCluster() { return false; } + function hasIsClustered() { return false; } function hasDropBehavior() { return false; } + function hasDropColumn() { return false; } function hasSRFs() { return false; } function hasDomains() { return false; } function hasDomainConstraints() { return false; } @@ -275,6 +276,10 @@ class BaseDB extends ADODB_base { function hasSchemaDump() { return false; } function hasFunctionRename() { return false; } function hasAlterColumnType() { return false; } + function hasUserSessionDefaults() { return false; } + function hasUserRename() { return false; } + function hasRecluster() { return false; } + function hasFullVacuum() { return false; } } diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index ef6c509b..da4ac071 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.208 2004/05/16 15:46:24 chriskl Exp $ + * $Id: Postgres.php,v 1.209 2004/05/19 01:28:34 soranzo Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -886,7 +886,7 @@ class Postgres extends BaseDB { /** * Formats a value or expression for sql purposes * @param $type The type of the field - * @param $mode VALUE or EXPRESSION + * @param $format VALUE or EXPRESSION * @param $value The actual value entered in the field. Can be NULL * @return The suitably quoted and escaped value. */ @@ -2018,6 +2018,8 @@ class Postgres extends BaseDB { } + // Index functions + /** * Grabs a list of indexes for a table * @param $table The name of a table whose indexes to retrieve @@ -2076,6 +2078,23 @@ class Postgres extends BaseDB { return $this->execute($sql); } + /** + * Clusters an index + * @param $index The name of the index + * @param $table The table the index is on + * @return 0 success + */ + function clusterIndex($index, $table) { + $this->fieldClean($index); + $this->fieldClean($table); + + // We don't bother with a transaction here, as there's no point rolling + // back an expensive cluster if a cheap analyze fails for whatever reason + $sql = "CLUSTER \"{$index}\" ON \"{$table}\""; + + return $this->execute($sql); + } + // Rule functions /** @@ -3255,15 +3274,18 @@ class Postgres extends BaseDB { /** * Vacuums a database - * @param $table (optional) The table to vacuum - */ - function vacuumDB($table = '') { + * @param $table The table to vacuum + * @param $analyze If true, also does analyze + * @param $full If true, selects "full" vacuum (PostgreSQL >= 7.2) + * @param $freeze If true, selects aggressive "freezing" of tuples (PostgreSQL >= 7.2) + */ + function vacuumDB($table = '', $analyze = false, $full = false, $freeze = false) { + $sql = "VACUUM"; + if ($analyze) $sql .= " ANALYZE"; if ($table != '') { $this->fieldClean($table); - $sql = "VACUUM \"{$table}\""; + $sql .= " \"{$table}\""; } - else - $sql = "VACUUM"; return $this->execute($sql); } @@ -3283,6 +3305,27 @@ class Postgres extends BaseDB { return $this->execute($sql); } + /** + * Rebuild indexes + * @param $type 'DATABASE' or 'TABLE' or 'INDEX' + * @param $name The name of the specific database, table, or index to be reindexed + * @param $force If true, recreates indexes forcedly in PostgreSQL 7.0-7.1, forces rebuild of system indexes in 7.2-7.3, ignored in >=7.4 + */ + function reindex($type, $name, $force=false) { + $this->fieldClean($name); + switch($type) { + case 'DATABASE': + case 'TABLE': + case 'INDEX': + $sql = "REINDEX {$type} {$name}"; + if ($force) $sql .= ' FORCE'; + break; + default: + return -1; + } + return $this->execute($sql); + } + // Constraint functions /** @@ -3775,11 +3818,8 @@ class Postgres extends BaseDB { function hasIndicies() { return true; } function hasRules() { return true; } function hasLanguages() { return true; } - function hasDropColumn() { return false; } function hasSRFs() { return true; } function hasOpClasses() { return true; } - function hasUserSessionDefaults() { return false; } - function hasUserRename() { return false; } function hasFunctionRename() { return true; } } diff --git a/classes/database/Postgres72.php b/classes/database/Postgres72.php index a6fe50b9..7ffca5cd 100644 --- a/classes/database/Postgres72.php +++ b/classes/database/Postgres72.php @@ -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.64 2004/05/14 07:56:38 chriskl Exp $ + * $Id: Postgres72.php,v 1.65 2004/05/19 01:28:34 soranzo Exp $ */ @@ -378,6 +378,26 @@ class Postgres72 extends Postgres71 { // Administration functions + /** + * Vacuums a database + * @param $table The table to vacuum + * @param $analyze If true, also does analyze + * @param $full If true, selects "full" vacuum (PostgreSQL >= 7.2) + * @param $freeze If true, selects aggressive "freezing" of tuples (PostgreSQL >= 7.2) + */ + function vacuumDB($table = '', $analyze = false, $full = false, $freeze = false) { + $sql = "VACUUM"; + if ($full) $sql .= " FULL"; + if ($freeze) $sql .= " FREEZE"; + if ($analyze) $sql .= " ANALYZE"; + if ($table != '') { + $this->fieldClean($table); + $sql .= " \"{$table}\""; + } + + return $this->execute($sql); + } + /** * Analyze a database * @note PostgreSQL 7.2 finally had an independent ANALYZE command @@ -474,6 +494,7 @@ class Postgres72 extends Postgres71 { function hasPartialIndexes() { return true; } function hasProcesses() { return true; } function hasStatsCollector() { return true; } + function hasFullVacuum() { return true; } } diff --git a/classes/database/Postgres73.php b/classes/database/Postgres73.php index e160f749..5db25d42 100644 --- a/classes/database/Postgres73.php +++ b/classes/database/Postgres73.php @@ -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.107 2004/05/16 15:42:30 chriskl Exp $ + * $Id: Postgres73.php,v 1.108 2004/05/19 01:28:34 soranzo Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -596,31 +596,6 @@ class Postgres73 extends Postgres72 { return $this->selectSet($sql); } - - /** - * Clusters an index - * @param $index The name of the index - * @param $table The table the index is on - * @param $analyze True to run analyze afterward, false otherwise - * @return 0 success - */ - function clusterIndex($index, $table, $analyze) { - $this->fieldClean($index); - $this->fieldClean($table); - - // We don't bother with a transaction here, as there's no point rolling - // back an expensive cluster if a cheap analyze fails for whatever reason - $sql = "CLUSTER \"{$index}\" ON \"{$table}\""; - $status = $this->execute($sql); - if ($status != 0) return $status; - - if ($analyze) { - $sql = "ANALYZE \"{$table}\""; - return $this->execute($sql); - } - else - return $status; - } /** * Grabs a single trigger @@ -941,30 +916,31 @@ class Postgres73 extends Postgres72 { } // Constraint functions + /** - * A function for getting all linking fields on the foreign keys based on the table names - * @param $table array of table names - * @return an array of linked tables and fields + * A function for getting all columns linked by foreign keys given a group of tables + * @param $tables Array of table names + * @return An array of linked tables and columns + * @return -1 $tables isn't an array */ - function &getLinkingKeys($arrTables) { - $this->arrayClean($arrTables); + function &getLinkingKeys($tables) { + if (!is_array($tables)) return -1; + + $this->arrayClean($tables); + $tables_list = "'" . implode("', '", $tables) . "'"; $maxDimension = 1; - - // Properly quote the tables - $tables = "'" . implode("', '", $arrTables) . "'"; - - //7.3 requires some workarounds since ANY doesn't support arrays + $sql = " SELECT DISTINCT array_dims(pc.conkey) AS arr_dim, - pgc1.relname AS p_table - FROM + pgc1.relname AS p_table + FROM pg_catalog.pg_constraint AS pc, - pg_catalog.pg_class AS pgc1 - WHERE + pg_catalog.pg_class AS pgc1 + WHERE pc.contype = 'f' AND (pc.conrelid = pgc1.relfilenode OR pc.confrelid = pgc1.relfilenode) - AND pgc1.relname IN ($tables) + AND pgc1.relname IN ($tables_list) "; //parse our output for find the highest dimension of foreign keys since pc.conkey is stored in an array @@ -975,20 +951,20 @@ class Postgres73 extends Postgres72 { $maxDimension = $tmpDimension > $maxDimension ? $tmpDimension : $maxDimension; $rs->MoveNext(); } - - //we know the highest index for foreign keys thaat conkey goes up to, expand for us in an IN query - $cons_str = '( (pfield.attnum = conkey[1] AND cfield.attnum = confkey[1]) '; + + //we know the highest index for foreign keys that conkey goes up to, expand for us in an IN query + $cons_str = '( (pfield.attnum = conkey[1] AND cfield.attnum = confkey[1]) '; for ($i = 2; $i <= $maxDimension; $i++) { - $cons_str .= "OR (pfield.attnum = conkey[{$i}] AND cfield.attnum = confkey[{$i}]) "; + $cons_str .= "OR (pfield.attnum = conkey[{$i}] AND cfield.attnum = confkey[{$i}]) "; } $cons_str .= ') '; - + $sql = " - SELECT - pgc1.relname AS p_table, + SELECT + pgc1.relname AS p_table, pgc2.relname AS f_table, pfield.attname AS p_field, - cfield.attname AS f_field + cfield.attname AS f_field FROM pg_catalog.pg_constraint AS pc, pg_catalog.pg_class AS pgc1, @@ -996,19 +972,19 @@ class Postgres73 extends Postgres72 { pg_catalog.pg_attribute AS pfield, pg_catalog.pg_attribute AS cfield WHERE - pc.contype = 'f' + pc.contype = 'f' AND pc.conrelid = pgc1.relfilenode AND pc.confrelid = pgc2.relfilenode AND pfield.attrelid = pc.conrelid AND cfield.attrelid = pc.confrelid - AND $cons_str - AND pgc1.relname IN ($tables) - AND pgc2.relname IN ($tables) + AND $cons_str + AND pgc1.relname IN ($tables_list) + AND pgc2.relname IN ($tables_list) AND pgc1.relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$this->_schema}') "; - return $this->selectSet($sql); + return $this->selectSet($sql); } /** @@ -1670,7 +1646,7 @@ class Postgres73 extends Postgres72 { // Capabilities function hasSchemas() { return true; } function hasConversions() { return true; } - function hasCluster() { return true; } + function hasIsClustered() { return true; } function hasDropBehavior() { return true; } function hasDropColumn() { return true; } function hasDomains() { return true; } diff --git a/classes/database/Postgres74.php b/classes/database/Postgres74.php index a9e1f9ec..81e6ca3e 100644 --- a/classes/database/Postgres74.php +++ b/classes/database/Postgres74.php @@ -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.30 2004/05/14 01:16:14 soranzo Exp $ + * $Id: Postgres74.php,v 1.31 2004/05/19 01:28:35 soranzo Exp $ */ include_once('./classes/database/Postgres73.php'); @@ -236,7 +236,24 @@ class Postgres74 extends Postgres73 { return $this->selectSet($sql); } - + + // Administration functions + + /** + * Recluster a table or all the tables in the current database + * @param $table (optional) The table to recluster + */ + function recluster($table = '') { + if ($table != '') { + $this->fieldClean($table); + $sql = "CLUSTER \"{$table}\""; + } + else + $sql = "CLUSTER"; + + return $this->execute($sql); + } + // Domain functions /** @@ -413,6 +430,7 @@ class Postgres74 extends Postgres73 { function hasUserRename() { return true; } function hasFunctionRename() { return true; } function hasSchemaDump() { return true; } + function hasRecluster() { return true; } } diff --git a/constraints.php b/constraints.php index 683c9648..bc5b77a1 100644 --- a/constraints.php +++ b/constraints.php @@ -3,7 +3,7 @@ /** * List constraints on a table * - * $Id: constraints.php,v 1.27 2004/05/09 06:21:26 chriskl Exp $ + * $Id: constraints.php,v 1.28 2004/05/19 01:28:34 soranzo Exp $ */ // Include application functions @@ -22,7 +22,7 @@ if ($confirm) { // Default analyze to on - if ($action == 'confirm_cluster_constraint') $_REQUEST['analyze'] = 'on'; + $_REQUEST['analyze'] = true; echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": " , $misc->printVal($_REQUEST['constraint']), ": {$lang['strcluster']}

\n"; @@ -30,24 +30,41 @@ echo "

", sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['constraint'])), "

\n"; echo "
\n"; + echo "

{$lang['stranalyze']}

\n"; echo "\n"; echo "\n"; echo "\n"; echo $misc->form; - echo "

{$lang['stranalyze']}

\n"; echo "\n"; echo "\n"; echo "
\n"; } else { - $status = $data->clusterIndex($_POST['constraint'], $_POST['table'], isset($_POST['analyze'])); + $status = $data->clusterIndex($_POST['constraint'], $_POST['table']); if ($status == 0) - doDefault($lang['strclusteredgood'] . ((isset($_POST['analyze']) ? ' ' . $lang['stranalyzegood'] : ''))); + if (isset($_POST['analyze'])) { + $status = $data->analyzeDB($_POST['table']); + if ($status == 0) + doDefault($lang['strclusteredgood'] . ' ' . $lang['stranalyzegood']); + else + doDefault($lang['stranalyzebad']); + } else + doDefault($lang['strclusteredgood']); else doDefault($lang['strclusteredbad']); } } + function doReindex() { + global $data, $lang; + + $status = $data->reindex('INDEX', $_REQUEST['constraint']); + if ($status == 0) + doDefault($lang['strreindexgood']); + else + doDefault($lang['strreindexbad']); + } + /** * Confirm and then actually add a FOREIGN KEY constraint */ @@ -448,13 +465,10 @@ if ($constraints->recordCount() > 0) { echo "\n"; echo "\n"; - if ($data->hasCluster()) { + if ($data->hasIsClustered()) { echo ""; - echo "\n"; - } - else { - echo "\n"; } + echo "\n"; echo "\n"; $i = 0; @@ -472,27 +486,32 @@ echo ")"; } echo ""; - if ($data->hasCluster()) { - if ($constraints->f['indisclustered'] !== null) { + if ($data->hasIsClustered()) { + if ($constraints->f['contype'] == 'u' || $constraints->f['contype'] == 'p') { $constraints->f['indisclustered'] = $data->phpBool($constraints->f['indisclustered']); echo ""; } else { echo ""; } } + // You can only cluster primary key and unique constraints! + if ($constraints->f['contype'] == 'u' || $constraints->f['contype'] == 'p') { + echo ""; + echo ""; + } + else { + echo ""; + echo ""; + } echo ""; - if ($data->hasCluster()) { - echo "\n"; - - } echo "\n"; $constraints->moveNext(); @@ -532,6 +551,9 @@ case 'confirm_cluster_constraint': doClusterIndex(true); break; + case 'reindex': + doReindex(); + break; case 'add_foreign_key': addForeignKey(1); break; diff --git a/database.php b/database.php index eaee6068..37aebb99 100755 --- a/database.php +++ b/database.php @@ -3,7 +3,7 @@ /** * Manage schemas within a database * - * $Id: database.php,v 1.42 2004/05/16 15:40:20 chriskl Exp $ + * $Id: database.php,v 1.43 2004/05/19 01:28:34 soranzo Exp $ */ // Include application functions @@ -355,13 +355,13 @@ if ($status == 0) doAdmin('', $lang['stranalyzegood']); else doAdmin('', $lang['stranalyzebad']); break; - case 'cluster': - $status = $data->analyzeDB(); + case 'recluster': + $status = $data->recluster(); if ($status == 0) doAdmin('', $lang['strclusteredgood']); - else doAdmin('', $lang['strclusterbad']); + else doAdmin('', $lang['strclusteredbad']); break; case 'reindex'; - $status = $data->analyzeDB(); + $status = $data->reindex('DATABASE', $_REQUEST['database'], isset($_REQUEST['reindex_force'])); if ($status == 0) doAdmin('', $lang['strreindexgood']); else doAdmin('', $lang['strreindexbad']); break; @@ -374,8 +374,10 @@ echo "\n"; echo "

{$lang['strvacuum']}

\n"; echo "{$lang['stranalyze']}
\n"; - echo "{$lang['strfull']}
\n"; - echo "{$lang['strfreeze']}
\n"; + if ($data->hasFullVacuum()) { + echo "{$lang['strfull']}
\n"; + echo "{$lang['strfreeze']}
\n"; + } echo "\n"; echo "\n"; echo $misc->form; @@ -389,13 +391,15 @@ echo $misc->form; echo "\n"; - // Cluster - echo "\n"; - echo "

{$lang['strcluster']}

\n"; - echo "\n"; - echo "\n"; - echo $misc->form; - echo "\n"; + // Recluster + if ($data->hasRecluster()){ + echo "\n"; + echo "

{$lang['strcluster']}

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + } // Reindex echo "\n"; @@ -618,7 +622,7 @@ if (isset($_GET['term'])) doFind(false); else doFind(true); break; - case 'cluster': + case 'recluster': case 'reindex': case 'analyze': case 'vacuum': diff --git a/indexes.php b/indexes.php index a0de32c6..e3912f03 100644 --- a/indexes.php +++ b/indexes.php @@ -3,7 +3,7 @@ /** * List indexes on a table * - * $Id: indexes.php,v 1.23 2004/05/11 07:12:09 chriskl Exp $ + * $Id: indexes.php,v 1.24 2004/05/19 01:28:34 soranzo Exp $ */ // Include application functions @@ -22,7 +22,7 @@ if ($confirm) { // Default analyze to on - if ($action == 'confirm_cluster_index') $_REQUEST['analyze'] = 'on'; + $_REQUEST['analyze'] = true; echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": " , $misc->printVal($_REQUEST['index']), ": {$lang['strcluster']}

\n"; @@ -30,25 +30,42 @@ echo "

", sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), "

\n"; echo "\n"; + echo "

{$lang['stranalyze']}

\n"; echo "\n"; echo "\n"; echo "\n"; echo $misc->form; - echo "

{$lang['stranalyze']}

\n"; echo "\n"; echo "\n"; echo "\n"; } else { - $status = $data->clusterIndex($_POST['index'], $_POST['table'], isset($_POST['analyze'])); + $status = $data->clusterIndex($_POST['index'], $_POST['table']); if ($status == 0) - doDefault($lang['strclusteredgood'] . ((isset($_POST['analyze']) ? ' ' . $lang['stranalyzegood'] : ''))); + if (isset($_POST['analyze'])){ + $status = $data->analyzeDB($_POST['table']); + if ($status == 0) + doDefault($lang['strclusteredgood'] . ' ' . $lang['stranalyzegood']); + else + doDefault($lang['stranalyzebad']); + } else + doDefault($lang['strclusteredgood']); else doDefault($lang['strclusteredbad']); } } + function doReindex() { + global $data, $lang; + + $status = $data->reindex('INDEX', $_REQUEST['index']); + if ($status == 0) + doDefault($lang['strreindexgood']); + else + doDefault($lang['strreindexbad']); + } + /** * Displays a screen where they can enter a new index */ @@ -207,13 +224,10 @@ echo "
{$lang['strname']}{$lang['strdefinition']}{$lang['strclustered']}{$lang['stractions']}{$lang['stractions']}{$lang['stractions']}
", ($constraints->f['indisclustered'] ? $lang['stryes'] : $lang['strno']), ""; + echo "href}&constraint=", + urlencode($constraints->f[$data->cnFields['conname']]), + "&table=", urlencode($_REQUEST['table']), "\">{$lang['strcluster']}"; + echo "href}&constraint=", + urlencode($constraints->f[$data->cnFields['conname']]), + "&table=", urlencode($_REQUEST['table']), "\">{$lang['strreindex']}"; echo "href}&constraint=", urlencode($constraints->f[$data->cnFields['conname']]), "&table=", urlencode($_REQUEST['table']), "&type=", urlencode($constraints->f['contype']), "\">{$lang['strdrop']}"; - // You can only cluster primary key and unique constraints! - if ($constraints->f['contype'] == 'u' || $constraints->f['contype'] == 'p') { - echo "href}&constraint=", urlencode($constraints->f[$data->cnFields['conname']]), - "&table=", urlencode($_REQUEST['table']), "\">{$lang['strcluster']}"; - } - echo "
\n"; echo "\n"; echo ""; - if ($data->hasCluster()) { + if ($data->hasIsClustered()) { echo ""; - echo "\n"; - } - else { - echo "\n"; } + echo "\n"; echo "\n"; $i = 0; @@ -221,18 +235,19 @@ $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo ""; echo ""; - if ($data->hasCluster()) { + if ($data->hasIsClustered()) { $indexes->f['indisclustered'] = $data->phpBool($indexes->f['indisclustered']); echo ""; } echo ""; + echo ""; + echo ""; - if ($data->hasCluster()) { - echo ""; - } + "&table=", urlencode($_REQUEST['table']), "\">{$lang['strdrop']}"; echo "\n"; $indexes->movenext(); @@ -262,6 +277,9 @@ case 'confirm_cluster_index': doClusterIndex(true); break; + case 'reindex': + doReindex(); + break; case 'save_create_index': if (isset($_POST['cancel'])) doDefault(); else doSaveCreateIndex(); -- 2.39.5
{$lang['strname']}{$lang['strdefinition']}{$lang['strclustered']}{$lang['stractions']}{$lang['stractions']}{$lang['stractions']}
", $misc->printVal( $indexes->f[$data->ixFields['idxname']]), "", $misc->printVal( $indexes->f[$data->ixFields['idxdef']]), "", ($indexes->f['indisclustered'] ? $lang['stryes'] : $lang['strno']), ""; + echo "href}&index=", urlencode( $indexes->f[$data->ixFields['idxname']]), + "&table=", urlencode($_REQUEST['table']), "\">{$lang['strcluster']}"; + echo "href}&index=", urlencode( $indexes->f[$data->ixFields['idxname']]), + "&table=", urlencode($_REQUEST['table']), "\">{$lang['strreindex']}"; echo "href}&index=", urlencode( $indexes->f[$data->ixFields['idxname']]), - "&table=", urlencode($_REQUEST['table']), "\">{$lang['strdrop']}"; - echo "href}&index=", urlencode( $indexes->f[$data->ixFields['idxname']]), - "&table=", urlencode($_REQUEST['table']), "\">{$lang['strcluster']}