Permalink
Browse files

Comment

  • Loading branch information...
1 parent 9f58dc6 commit 87888f10481cf24b4a4d8f03c863746288f80f93 @vrana committed Mar 28, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −1 adminer/foreign.inc.php
  2. +1 −0 todo.txt
View
@@ -12,7 +12,7 @@
}
query_redirect("ALTER TABLE " . table($TABLE)
. ($_GET["name"] != "" ? "\nDROP FOREIGN KEY " . idf_escape($_GET["name"]) . "," : "")
- . "\nADD FOREIGN KEY (" . implode(", ", array_map('idf_escape', $source)) . ") REFERENCES " . table($_POST["table"]) . " (" . implode(", ", array_map('idf_escape', $target)) . ")"
+ . "\nADD FOREIGN KEY (" . implode(", ", array_map('idf_escape', $source)) . ") REFERENCES " . table($_POST["table"]) . " (" . implode(", ", array_map('idf_escape', $target)) . ")" //! reuse $_GET["name"] - check in older MySQL versions
. (in_array($_POST["on_delete"], $on_actions) ? " ON DELETE $_POST[on_delete]" : "")
. (in_array($_POST["on_update"], $on_actions) ? " ON UPDATE $_POST[on_update]" : "")
, ME . "table=" . urlencode($TABLE), ($_GET["name"] != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.')));
View
@@ -10,6 +10,7 @@ Only first part of big BZ2 export is readable, files are missing in TAR
Double click in select - Esc to abort editation
Draggable columns in alter table (thanks to Michal Manak)
<option class> for system databases and schemas - information_schema and driver-specific (thanks to Vaclav Novotny)
+Define indexes and foreign keys name - http://forum.zdrojak.root.cz/index.php?topic=185.msg1255#msg1255
? Filter by value in row under <thead> in select
? Column and table names auto-completition in SQL textarea - http://blog.quplo.com/2010/06/css-code-completion-in-your-browser/
? Aliasing of built-in functions can save 7 KB, function minification can save 7 KB, substitution of repetitive $a["a"] can save 4 KB, substitution of $_GET and friends can save 2 KB, aliasing of $connection->query can save 24 B, JS Closure compiler can save 2 KB, not enclosing HTML attribute values can save 1.2 KB, replacing \\n by \n can save .3 KB

0 comments on commit 87888f1

Please sign in to comment.