select and no table
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-06-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* sql.php3, db_details_db_info.php3, db_details_links.php3: bug with a
|
||||||
|
Select and no table
|
||||||
|
|
||||||
2002-06-26 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-06-26 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* lang/czech-*.inc.php3: Shorter term for QBE, thanks again to
|
* lang/czech-*.inc.php3: Shorter term for QBE, thanks again to
|
||||||
Michal Cihar (nijel).
|
Michal Cihar (nijel).
|
||||||
|
@@ -11,22 +11,22 @@ if (PMA_MYSQL_INT_VERSION >= 32303) {
|
|||||||
// Special speedup for newer MySQL Versions (in 4.0 format changed)
|
// Special speedup for newer MySQL Versions (in 4.0 format changed)
|
||||||
if ($cfg['SkipLockedTables'] == TRUE && PMA_MYSQL_INT_VERSION >= 32330) {
|
if ($cfg['SkipLockedTables'] == TRUE && PMA_MYSQL_INT_VERSION >= 32330) {
|
||||||
$local_query = 'SHOW OPEN TABLES FROM ' . PMA_backquote($db);
|
$local_query = 'SHOW OPEN TABLES FROM ' . PMA_backquote($db);
|
||||||
$result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
$db_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||||
// Blending out tables in use
|
// Blending out tables in use
|
||||||
if ($result != FALSE && mysql_num_rows($result) > 0) {
|
if ($db_info_result != FALSE && mysql_num_rows($db_info_result) > 0) {
|
||||||
while ($tmp = PMA_mysql_fetch_row($result)) {
|
while ($tmp = PMA_mysql_fetch_row($db_info_result)) {
|
||||||
// if in use memorize tablename
|
// if in use memorize tablename
|
||||||
if (eregi('in_use=[1-9]+', $tmp[1])) {
|
if (eregi('in_use=[1-9]+', $tmp[1])) {
|
||||||
$sot_cache[$tmp[0]] = TRUE;
|
$sot_cache[$tmp[0]] = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mysql_free_result($result);
|
mysql_free_result($db_info_result);
|
||||||
|
|
||||||
if (isset($sot_cache)) {
|
if (isset($sot_cache)) {
|
||||||
$local_query = 'SHOW TABLES FROM ' . PMA_backquote($db);
|
$local_query = 'SHOW TABLES FROM ' . PMA_backquote($db);
|
||||||
$result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
$db_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||||
if ($result != FALSE && mysql_num_rows($result) > 0) {
|
if ($db_info_result != FALSE && mysql_num_rows($db_info_result) > 0) {
|
||||||
while ($tmp = PMA_mysql_fetch_row($result)) {
|
while ($tmp = PMA_mysql_fetch_row($db_info_result)) {
|
||||||
if (!isset($sot_cache[$tmp[0]])) {
|
if (!isset($sot_cache[$tmp[0]])) {
|
||||||
$local_query = 'SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\'';
|
$local_query = 'SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\'';
|
||||||
$sts_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
$sts_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||||
@@ -36,7 +36,7 @@ if (PMA_MYSQL_INT_VERSION >= 32303) {
|
|||||||
$tables[] = array('Name' => $tmp[0]);
|
$tables[] = array('Name' => $tmp[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mysql_free_result($result);
|
mysql_free_result($db_info_result);
|
||||||
$sot_ready = TRUE;
|
$sot_ready = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,23 +44,23 @@ if (PMA_MYSQL_INT_VERSION >= 32303) {
|
|||||||
}
|
}
|
||||||
if (!isset($sot_ready)) {
|
if (!isset($sot_ready)) {
|
||||||
$local_query = 'SHOW TABLE STATUS FROM ' . PMA_backquote($db);
|
$local_query = 'SHOW TABLE STATUS FROM ' . PMA_backquote($db);
|
||||||
$result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
$db_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||||
if ($result != FALSE && mysql_num_rows($result) > 0) {
|
if ($db_info_result != FALSE && mysql_num_rows($db_info_result) > 0) {
|
||||||
while ($sts_tmp = PMA_mysql_fetch_array($result)) {
|
while ($sts_tmp = PMA_mysql_fetch_array($db_info_result)) {
|
||||||
$tables[] = $sts_tmp;
|
$tables[] = $sts_tmp;
|
||||||
}
|
}
|
||||||
mysql_free_result($result);
|
mysql_free_result($db_info_result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$num_tables = (isset($tables) ? count($tables) : 0);
|
$num_tables = (isset($tables) ? count($tables) : 0);
|
||||||
} // end if (PMA_MYSQL_INT_VERSION >= 32303)
|
} // end if (PMA_MYSQL_INT_VERSION >= 32303)
|
||||||
else {
|
else {
|
||||||
$result = PMA_mysql_list_tables($db);
|
$db_info_result = PMA_mysql_list_tables($db);
|
||||||
$num_tables = ($result) ? @mysql_numrows($result) : 0;
|
$num_tables = ($db_info_result) ? @mysql_numrows($db_info_result) : 0;
|
||||||
for ($i = 0; $i < $num_tables; $i++) {
|
for ($i = 0; $i < $num_tables; $i++) {
|
||||||
$tables[] = PMA_mysql_tablename($result, $i);
|
$tables[] = PMA_mysql_tablename($db_info_result, $i);
|
||||||
}
|
}
|
||||||
mysql_free_result($result);
|
mysql_free_result($db_info_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -70,4 +70,4 @@ else {
|
|||||||
echo '<!-- Top menu links -->' . "\n";
|
echo '<!-- Top menu links -->' . "\n";
|
||||||
require('./db_details_links.php3');
|
require('./db_details_links.php3');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -23,7 +23,7 @@ else {
|
|||||||
// Drop link if allowed
|
// Drop link if allowed
|
||||||
if (!$cfg['AllowUserDropDatabase']) {
|
if (!$cfg['AllowUserDropDatabase']) {
|
||||||
// Check if the user is a Superuser
|
// Check if the user is a Superuser
|
||||||
$result = @PMA_mysql_query('USE mysql');
|
$links_result = @PMA_mysql_query('USE mysql');
|
||||||
$cfg['AllowUserDropDatabase'] = (!PMA_mysql_error());
|
$cfg['AllowUserDropDatabase'] = (!PMA_mysql_error());
|
||||||
}
|
}
|
||||||
if ($cfg['AllowUserDropDatabase']) {
|
if ($cfg['AllowUserDropDatabase']) {
|
||||||
|
11
sql.php3
11
sql.php3
@@ -283,7 +283,6 @@ else {
|
|||||||
|
|
||||||
// Executes the query
|
// Executes the query
|
||||||
$result = @PMA_mysql_query($full_sql_query);
|
$result = @PMA_mysql_query($full_sql_query);
|
||||||
|
|
||||||
// Displays an error message if required and stop parsing the script
|
// Displays an error message if required and stop parsing the script
|
||||||
if (PMA_mysql_error()) {
|
if (PMA_mysql_error()) {
|
||||||
$error = PMA_mysql_error();
|
$error = PMA_mysql_error();
|
||||||
@@ -428,8 +427,14 @@ else {
|
|||||||
} else {
|
} else {
|
||||||
$js_to_run = 'functions.js';
|
$js_to_run = 'functions.js';
|
||||||
unset($message);
|
unset($message);
|
||||||
include('./tbl_properties_common.php3');
|
if (isset($table) && !empty($table)) {
|
||||||
include('./tbl_properties_table_info.php3');
|
include('./tbl_properties_common.php3');
|
||||||
|
include('./tbl_properties_table_info.php3');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
include('./db_details_common.php3');
|
||||||
|
include('./db_details_db_info.php3');
|
||||||
|
}
|
||||||
include('./libraries/relation.lib.php3');
|
include('./libraries/relation.lib.php3');
|
||||||
$cfgRelation = PMA_getRelationsParam();
|
$cfgRelation = PMA_getRelationsParam();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user