3 // vim: expandtab sw=4 ts=4 sts=4:
5 // this should be recoded as functions, to avoid messing with global
10 require_once('./libraries/common.lib.php');
12 PMA_checkParameters(array('db', 'table'));
15 * Gets table informations
17 // The 'show table' statement works correct since 3.23.03
18 $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
19 $table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
20 $showtable = PMA_mysql_fetch_array($table_info_result);
21 $tbl_type = strtoupper($showtable['Type']);
22 $tbl_charset = empty($showtable['Charset']) ?
'' : $showtable['Charset'];
23 $table_info_num_rows = (isset($showtable['Rows']) ?
$showtable['Rows'] : 0);
24 $show_comment = (isset($showtable['Comment']) ?
$showtable['Comment'] : '');
25 $auto_increment = (isset($showtable['Auto_increment']) ?
$showtable['Auto_increment'] : '');
27 $tmp = explode(' ', $showtable['Create_options']);
28 $tmp_cnt = count($tmp);
29 for ($i = 0; $i < $tmp_cnt; $i++
) {
30 $tmp1 = explode('=', $tmp[$i]);
31 if (isset($tmp1[1])) {
36 mysql_free_result($table_info_result);
40 * Displays top menu links
42 echo '<!-- top menu -->' . "\n";
43 require('./tbl_properties_links.php');
47 * Displays table comment
49 if (!empty($show_comment) && !isset($avoid_show_comment)) {
51 <!-- Table comment
-->
53 <?php
echo htmlspecialchars($show_comment) . "\n"; ?
>