Comment
This commit is contained in:
parent
9f58dc6328
commit
87888f1048
|
@ -12,7 +12,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
|
|||
}
|
||||
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.')));
|
||||
|
|
1
todo.txt
1
todo.txt
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue