00001 <?php
00002
00003
00004
00005
00006
00007
00008 require_once('./libraries/common.lib.php');
00009
00010
00011 PMA_checkParameters(array('db', 'table'));
00012
00017 global $showtable, $tbl_is_view, $tbl_type, $show_comment, $tbl_collation,
00018 $table_info_num_rows, $auto_increment;
00019
00024
00025
00026 PMA_DBI_select_db($db);
00027
00028
00029 $table_info_result = PMA_DBI_query('SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\';', NULL, PMA_DBI_QUERY_STORE);
00030
00031
00032
00033
00034
00035 if ($table_info_result && PMA_DBI_num_rows($table_info_result) > 0) {
00036 $showtable = PMA_DBI_fetch_assoc($table_info_result);
00037 if (!isset($showtable['Type']) && isset($showtable['Engine'])) {
00038 $showtable['Type'] =& $showtable['Engine'];
00039 }
00040 if (PMA_MYSQL_INT_VERSION >= 50000 && !isset($showtable['Type']) && isset($showtable['Comment']) && $showtable['Comment'] == 'view') {
00041 $tbl_is_view = TRUE;
00042 $tbl_type = $strView;
00043 $show_comment = NULL;
00044 } else {
00045 $tbl_is_view = FALSE;
00046 $tbl_type = isset($showtable['Type']) ? strtoupper($showtable['Type']) : '';
00047
00048
00049 if (isset($submitcomment) && isset($comment)) {
00050 $show_comment = $comment;
00051 } else {
00052 $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
00053 }
00054 }
00055 $tbl_collation = empty($showtable['Collation']) ? '' : $showtable['Collation'];
00056 $table_info_num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
00057 $auto_increment = (isset($showtable['Auto_increment']) ? $showtable['Auto_increment'] : '');
00058
00059 $tmp = isset($showtable['Create_options']) ? explode(' ', $showtable['Create_options']) : array();
00060 $tmp_cnt = count($tmp);
00061 for ($i = 0; $i < $tmp_cnt; $i++) {
00062 $tmp1 = explode('=', $tmp[$i]);
00063 if (isset($tmp1[1])) {
00064 $$tmp1[0] = $tmp1[1];
00065 }
00066 }
00067 PMA_DBI_free_result($table_info_result);
00068 unset($tmp1, $tmp, $table_info_result);
00069 }
00070 ?>