From 3f161ab8f76440e1aebe7832f7e7967262e8b2ea Mon Sep 17 00:00:00 2001 From: chriskl Date: Wed, 23 Jul 2003 01:42:12 +0000 Subject: [PATCH] support zero column tables --- tblproperties.php | 71 ++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/tblproperties.php b/tblproperties.php index 8e8332b7..e55decb2 100644 --- a/tblproperties.php +++ b/tblproperties.php @@ -3,7 +3,7 @@ /** * List tables in a database * - * $Id: tblproperties.php,v 1.16 2003/05/30 08:27:04 chriskl Exp $ + * $Id: tblproperties.php,v 1.17 2003/07/23 01:42:12 chriskl Exp $ */ // Include application functions @@ -244,46 +244,41 @@ $attrs = &$localData->getTableAttributes($_REQUEST['table']); $misc->printMsg($msg); - if ($attrs->recordCount() > 0) { - echo "\n"; - echo ""; - echo ""; - if ($data->hasDropColumn()) - echo "\n"; - else - echo "\n"; - $i = 0; - while (!$attrs->EOF) { - $attrs->f['attnotnull'] = $localData->phpBool($attrs->f['attnotnull']); - $id = (($i % 2) == 0 ? '1' : '2'); - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "
{$lang['strfield']}{$lang['strtype']}{$lang['strnotnull']}{$lang['strdefault']}{$lang['stractions']}{$lang['stractions']}
", $misc->printVal($attrs->f['attname']), "", $misc->printVal($attrs->f['type']), "", ($attrs->f['attnotnull'] ? 'NOT NULL' : ''), "", $misc->printVal($attrs->f['adsrc']), "
\n"; + echo ""; + echo ""; + if ($data->hasDropColumn()) + echo "\n"; + else + echo "\n"; + $i = 0; + while (!$attrs->EOF) { + $attrs->f['attnotnull'] = $localData->phpBool($attrs->f['attnotnull']); + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($data->hasDropColumn()) { echo "\n"; - if ($data->hasDropColumn()) { - echo "\n"; - } - echo "\n"; - $attrs->moveNext(); - $i++; + "&column=", urlencode($attrs->f['attname']), "&action=confirm_drop\">{$lang['strdrop']}\n"; } - echo "
{$lang['strfield']}{$lang['strtype']}{$lang['strnotnull']}{$lang['strdefault']}{$lang['stractions']}{$lang['stractions']}
", $misc->printVal($attrs->f['attname']), "", $misc->printVal($attrs->f['type']), "", ($attrs->f['attnotnull'] ? 'NOT NULL' : ''), "", $misc->printVal($attrs->f['adsrc']), "href}&table=", urlencode($_REQUEST['table']), + "&column=", urlencode($attrs->f['attname']), "&action=properties\">{$lang['strproperties']}href}&table=", urlencode($_REQUEST['table']), - "&column=", urlencode($attrs->f['attname']), "&action=properties\">{$lang['strproperties']}href}&table=", urlencode($_REQUEST['table']), - "&column=", urlencode($attrs->f['attname']), "&action=confirm_drop\">{$lang['strdrop']}
\n"; - echo "
\n"; - - echo "\n"; - } - else { - echo "

{$lang['strnotable']}

\n"; + echo "\n"; + $attrs->moveNext(); + $i++; } + echo "\n"; + echo "
\n"; + + echo "\n"; } $misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table']); -- 2.39.5