use already retrieved table info

This commit is contained in:
Sebastian Mendel
2008-05-09 14:39:58 +00:00
parent df216c95ec
commit 3a228111ae
4 changed files with 92 additions and 86 deletions

View File

@@ -10,6 +10,8 @@
/**
*
*/
require_once './libraries/Table.class.php';
if (empty($is_db)) {
if (strlen($db)) {
$is_db = @PMA_DBI_select_db($db);
@@ -40,12 +42,17 @@ if (empty($is_db)) {
if (empty($is_table) && !defined('PMA_SUBMIT_MULT')) {
// Not a valid table name -> back to the db_sql.php
if (strlen($table)) {
$_result = PMA_DBI_try_query(
'SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, true) . '\';',
null, PMA_DBI_QUERY_STORE);
$is_table = @PMA_DBI_num_rows($_result);
PMA_DBI_free_result($_result);
$is_table = isset(PMA_Table::$cache[$db][$table]);
if (! $is_table) {
$_result = PMA_DBI_try_query(
'SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, true) . '\';',
null, PMA_DBI_QUERY_STORE);
$is_table = @PMA_DBI_num_rows($_result);
PMA_DBI_free_result($_result);
}
} else {
$is_table = false;
}