3 // vim: expandtab sw=4 ts=4 sts=4:
5 // this should be recoded as functions, to avoid messing with global
10 if (!defined('PMA_COMMON_LIB_INCLUDED')) {
11 include('./libraries/common.lib.php3');
14 PMA_checkParameters(array('db', 'table'));
17 * Gets table informations
19 // The 'show table' statement works correct since 3.23.03
20 if (PMA_MYSQL_INT_VERSION
>= 32303) {
21 $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
22 $table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
23 $showtable = PMA_mysql_fetch_array($table_info_result);
24 $tbl_type = strtoupper($showtable['Type']);
25 $tbl_charset = empty($showtable['Charset']) ?
'' : $showtable['Charset'];
26 $table_info_num_rows = (isset($showtable['Rows']) ?
$showtable['Rows'] : 0);
27 $show_comment = (isset($showtable['Comment']) ?
$showtable['Comment'] : '');
28 $auto_increment = (isset($showtable['Auto_increment']) ?
$showtable['Auto_increment'] : '');
30 $tmp = explode(' ', $showtable['Create_options']);
31 $tmp_cnt = count($tmp);
32 for ($i = 0; $i < $tmp_cnt; $i++
) {
33 $tmp1 = explode('=', $tmp[$i]);
34 if (isset($tmp1[1])) {
41 $local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table);
42 $table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
44 $table_info_num_rows = PMA_mysql_result($table_info_result, 0, 'count');
47 mysql_free_result($table_info_result);
51 * Displays top menu links
53 echo '<!-- top menu -->' . "\n";
54 require('./tbl_properties_links.php3');
58 * Displays table comment
60 if (!empty($show_comment)) {
62 <!-- Table comment
-->
64 <?php
echo htmlspecialchars($show_comment) . "\n"; ?
>