Host privileges
[phpmyadmin/crack.git] / tbl_properties_table_info.php3
bloba4abf8718abe49db671819e680141e215b137dd9
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 // this should be recoded as functions, to avoid messing with global
6 // variables
8 /**
9 * Gets table informations
11 // The 'show table' statement works correct since 3.23.03
12 if (PMA_MYSQL_INT_VERSION >= 32303) {
13 $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
14 $table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
15 $showtable = PMA_mysql_fetch_array($table_info_result);
16 $tbl_type = strtoupper($showtable['Type']);
17 $table_info_num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
18 $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
19 $auto_increment = (isset($showtable['Auto_increment']) ? $showtable['Auto_increment'] : '');
21 $tmp = explode(' ', $showtable['Create_options']);
22 $tmp_cnt = count($tmp);
23 for ($i = 0; $i < $tmp_cnt; $i++) {
24 $tmp1 = explode('=', $tmp[$i]);
25 if (isset($tmp1[1])) {
26 $$tmp1[0] = $tmp1[1];
28 } // end for
29 unset($tmp1);
30 unset($tmp);
31 } else {
32 $local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table);
33 $table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
34 $showtable = array();
35 $table_info_num_rows = PMA_mysql_result($table_info_result, 0, 'count');
36 $show_comment = '';
38 mysql_free_result($table_info_result);
41 /**
42 * Displays top menu links
44 echo '<!-- top menu -->' . "\n";
45 require('./tbl_properties_links.php3');
48 /**
49 * Displays table comment
51 if (!empty($show_comment)) {
53 <!-- Table comment -->
54 <p><i>
55 <?php echo htmlspecialchars($show_comment) . "\n"; ?>
56 </i></p>
57 <?php
58 } // end if
60 echo "\n\n";