back to the welcome page if (!empty($db)) { $is_db = @mysql_select_db($db); } if (empty($db) || !$is_db) { header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); exit(); } // Displays headers if (!isset($message)) { $js_to_run = 'functions.js'; include('./header.inc.php3'); // Reloads the navigation frame via JavaScript if required if (isset($reload) && $reload) { echo "\n"; ?> = 32303) { // Special speedup for newer MySQL Versions (in 4.0 format changed) if ($cfgSkipLockedTables == TRUE && MYSQL_INT_VERSION >= 32330) { $local_query = 'SHOW OPEN TABLES FROM ' . backquote($db); $result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0); // Blending out tables in use if ($result != FALSE && mysql_num_rows($result) > 0) { while ($tmp = mysql_fetch_row($result)) { // if in use memorize tablename if (eregi('in_use=[1-9]+', $tmp[1])) { $sot_cache[$tmp[0]] = TRUE; } } mysql_free_result($result); if (isset($sot_cache)) { $local_query = 'SHOW TABLES FROM ' . backquote($db); $result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0); if ($result != FALSE && mysql_num_rows($result) > 0) { while ($tmp = mysql_fetch_row($result)) { if (!isset($sot_cache[$tmp[0]])) { $local_query = 'SHOW TABLE STATUS FROM ' . backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\''; $sts_result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0); $sts_tmp = mysql_fetch_array($sts_result); $tables[] = $sts_tmp; } else { // table in use $tables[] = array('Name' => $tmp[0]); } } mysql_free_result($result); $sot_ready = TRUE; } } } } if (!isset($sot_ready)) { $local_query = 'SHOW TABLE STATUS FROM ' . backquote($db); $result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0); if ($result != FALSE && mysql_num_rows($result) > 0) { while ($sts_tmp = mysql_fetch_array($result)) { $tables[] = $sts_tmp; } mysql_free_result($result); } } $num_tables = (isset($tables) ? count($tables) : 0); } // end if (MYSQL_INT_VERSION >= 32303) else { $result = mysql_list_tables($db); $num_tables = @mysql_numrows($result); for ($i = 0; $i < $num_tables; $i++) { $tables[] = mysql_tablename($result, $i); } mysql_free_result($result); } /** * Displays an html table with all the tables contained into the current * database */ ?> = 3.23 - staybyte - 11 June 2001 else if (MYSQL_INT_VERSION >= 32300) { ?>
= 3.23 // 3. Shows tables list mysql < 3.23 else { $i = 0; echo "\n"; ?>