1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 17:44:07 +02:00

DESC in last order

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@68 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2007-07-06 14:07:13 +00:00
parent d591a94538
commit 7c392c4063

View File

@@ -25,7 +25,7 @@ if (!$columns) {
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "REGEXP", "IS NULL");
$i = 0;
foreach ((array) $_GET["where"] as $val) {
if ($val["col"] && in_array($val["op"], $operators)) {
if (strlen($val["col"]) && in_array($val["op"], $operators)) {
$where[] = idf_escape($val["col"]) . " $val[op]" . ($val["op"] != "IS NULL" ? " '" . mysql_real_escape_string($val["val"]) . "'" : "");
echo "<div><select name='where[$i][col]'><option></option>" . optionlist($columns, $val["col"], "not_vals") . "</select>";
echo "<select name='where[$i][op]' onchange=\"where_change(this);\">" . optionlist($operators, $val["op"], "not_vals") . "</select>";
@@ -64,7 +64,7 @@ for (var i=0; <?php echo $i; ?> > i; i++) {
}
}
echo "<div><select name='order[$i]'><option></option>" . optionlist($columns, array(), "not_vals") . "</select>";
echo "<input type='checkbox' name='desc[$i]' value='1' id='desc-$i' /><label for='desc-$i'>" . lang('DESC') . "</label></div>\n";
echo "<input type='checkbox' name='desc[]' value='$i' id='desc-$i' /><label for='desc-$i'>" . lang('DESC') . "</label></div>\n";
echo "</fieldset>\n";
echo "<fieldset><legend>" . lang('Limit') . "</legend>\n";
@@ -88,7 +88,7 @@ for (var i=0; <?php echo $i; ?> > i; i++) {
$foreign_keys[$val][] = $foreign_key;
}
}
$childs = array();
$childs = array(); //! use foreign_keys() in MySQL < 5
$result1 = mysql_query("SELECT * FROM information_schema.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_SCHEMA = '" . mysql_real_escape_string($_GET["db"]) . "' AND REFERENCED_TABLE_NAME = '" . mysql_real_escape_string($_GET["select"]) . "' ORDER BY ORDINAL_POSITION");
while ($row1 = mysql_fetch_assoc($result1)) {
$childs[$row1["CONSTRAINT_NAME"]][0] = $row1["TABLE_SCHEMA"];