table info
This commit is contained in:
@@ -10,6 +10,8 @@ $Source$
|
|||||||
start the split
|
start the split
|
||||||
* tbl_properties.php3, new tbl_properties_export.php3,
|
* tbl_properties.php3, new tbl_properties_export.php3,
|
||||||
tbl_properties_links.php3, lang/*.php3: export is splitted
|
tbl_properties_links.php3, lang/*.php3: export is splitted
|
||||||
|
* new tbl_properties_table_info, to be able to display links
|
||||||
|
on the export page
|
||||||
|
|
||||||
2002-04-28 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-04-28 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* header.inc.php3, lines 162-170: Improved patch #548696.
|
* header.inc.php3, lines 162-170: Improved patch #548696.
|
||||||
|
@@ -67,39 +67,8 @@ if (isset($submitorderby) && !empty($order_field)) {
|
|||||||
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
|
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. Get table information
|
||||||
/**
|
require('./tbl_properties_table_info.php3');
|
||||||
* Gets table informations and displays these informations and also top
|
|
||||||
* browse/select/insert/empty links
|
|
||||||
*/
|
|
||||||
// The 'show table' statement works correct since 3.23.03
|
|
||||||
if (PMA_MYSQL_INT_VERSION >= 32303) {
|
|
||||||
$local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
|
|
||||||
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
|
||||||
$showtable = mysql_fetch_array($result);
|
|
||||||
$tbl_type = strtoupper($showtable['Type']);
|
|
||||||
$num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
|
|
||||||
$show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
|
|
||||||
} else {
|
|
||||||
$local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table);
|
|
||||||
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
|
||||||
$showtable = array();
|
|
||||||
$num_rows = mysql_result($result, 0, 'count');
|
|
||||||
$show_comment = '';
|
|
||||||
}
|
|
||||||
mysql_free_result($result);
|
|
||||||
|
|
||||||
echo '<!-- first browse links -->' . "\n";
|
|
||||||
require('./tbl_properties_links.php3');
|
|
||||||
|
|
||||||
if (!empty($show_comment)) {
|
|
||||||
?>
|
|
||||||
<!-- Table comment -->
|
|
||||||
<p><i>
|
|
||||||
<?php echo $show_comment . "\n"; ?>
|
|
||||||
</i></p>
|
|
||||||
<?php
|
|
||||||
} // end (1.)
|
|
||||||
|
|
||||||
// 2. Gets table keys and retains them
|
// 2. Gets table keys and retains them
|
||||||
$local_query = 'SHOW KEYS FROM ' . PMA_backquote($table);
|
$local_query = 'SHOW KEYS FROM ' . PMA_backquote($table);
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
require('./tbl_properties_common.php3');
|
require('./tbl_properties_common.php3');
|
||||||
|
require('./tbl_properties_table_info.php3');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!-- Dump of a database -->
|
<!-- Dump of a database -->
|
||||||
|
37
tbl_properties_table_info.php3
Executable file
37
tbl_properties_table_info.php3
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets table informations and displays these informations and also top
|
||||||
|
* browse/select/insert/empty links
|
||||||
|
*/
|
||||||
|
// The 'show table' statement works correct since 3.23.03
|
||||||
|
if (PMA_MYSQL_INT_VERSION >= 32303) {
|
||||||
|
$local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
|
||||||
|
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||||
|
$showtable = mysql_fetch_array($result);
|
||||||
|
$tbl_type = strtoupper($showtable['Type']);
|
||||||
|
$num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
|
||||||
|
$show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
|
||||||
|
} else {
|
||||||
|
$local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table);
|
||||||
|
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||||
|
$showtable = array();
|
||||||
|
$num_rows = mysql_result($result, 0, 'count');
|
||||||
|
$show_comment = '';
|
||||||
|
}
|
||||||
|
mysql_free_result($result);
|
||||||
|
|
||||||
|
echo '<!-- first browse links -->' . "\n";
|
||||||
|
require('./tbl_properties_links.php3');
|
||||||
|
|
||||||
|
if (!empty($show_comment)) {
|
||||||
|
?>
|
||||||
|
<!-- Table comment -->
|
||||||
|
<p><i>
|
||||||
|
<?php echo $show_comment . "\n"; ?>
|
||||||
|
</i></p>
|
||||||
|
<?php
|
||||||
|
} // end (1.)
|
||||||
|
|
||||||
|
?>
|
Reference in New Issue
Block a user