1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 10:04:07 +02:00

Fix big tables check

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1512 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2010-05-03 16:08:46 +00:00
parent 0b064b516d
commit 6d2b7c5a15

View File

@@ -479,7 +479,6 @@ ORDER BY ORDINAL_POSITION");
function _foreignKeyOptions($table, $column) {
global $connection;
$table_status = table_status($table);
$foreignKeys = column_foreign_keys($table);
foreach ((array) $foreignKeys[$column] as $foreignKey) {
if (count($foreignKey["source"]) == 1) {
@@ -488,6 +487,7 @@ ORDER BY ORDINAL_POSITION");
if ($name != "") {
$return = &$this->_values[$foreignKey["table"]];
if (!isset($return)) {
$table_status = table_status($foreignKey["table"]);
$return = ($table_status["Rows"] > 1000 ? array() : array("" => "") + get_key_vals("SELECT $id, $name FROM " . idf_escape($foreignKey["table"]) . " ORDER BY 2"));
}
return $return;