mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Support function default values in insert (bug #713)
This commit is contained in:
@@ -1461,6 +1461,9 @@ function edit_form($table, $fields, $row, $update) {
|
||||
: ($value === false ? null : ($value !== null ? '' : 'NULL'))
|
||||
)
|
||||
);
|
||||
if (!$_POST && !$update && $value == $field["default"] && preg_match('~^[\w.]+\(~', $value)) {
|
||||
$function = "SQL";
|
||||
}
|
||||
if (preg_match("~time~", $field["type"]) && preg_match('~^CURRENT_TIMESTAMP~i', $value)) {
|
||||
$value = "";
|
||||
$function = "now";
|
||||
|
Reference in New Issue
Block a user