mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 07:06:45 +02:00
MySQL: Don't offer empty enum value in edit
MySQL errors if there's an invalid value on the first row of INSERT or UPDATE, regardless of the sql_mode variable.
This commit is contained in:
@@ -710,7 +710,7 @@ class Adminer {
|
|||||||
if ($field["type"] == "enum") {
|
if ($field["type"] == "enum") {
|
||||||
return (isset($_GET["select"]) ? "<label><input type='radio'$attrs value='-1' checked><i>" . lang('original') . "</i></label> " : "")
|
return (isset($_GET["select"]) ? "<label><input type='radio'$attrs value='-1' checked><i>" . lang('original') . "</i></label> " : "")
|
||||||
. ($field["null"] ? "<label><input type='radio'$attrs value=''" . ($value !== null || isset($_GET["select"]) ? "" : " checked") . "><i>NULL</i></label> " : "")
|
. ($field["null"] ? "<label><input type='radio'$attrs value=''" . ($value !== null || isset($_GET["select"]) ? "" : " checked") . "><i>NULL</i></label> " : "")
|
||||||
. enum_input("radio", $attrs, $field, $value, 0) // 0 - empty
|
. enum_input("radio", $attrs, $field, $value, $value === 0 ? 0 : null) // 0 - empty value
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
Adminer 4.17.0-dev:
|
Adminer 4.17.0-dev:
|
||||||
Hide index column options by default
|
Hide index column options by default
|
||||||
MySQL, PostgreSQL, MS SQL: Support CHECK constraint
|
MySQL, PostgreSQL, MS SQL: Support CHECK constraint
|
||||||
|
MySQL: Don't offer empty enum value in edit
|
||||||
PostgreSQL: Link user defined types
|
PostgreSQL: Link user defined types
|
||||||
PostgreSQL: Constraint enum values in editing (bug #270)
|
PostgreSQL: Constraint enum values in editing (bug #270)
|
||||||
SQLite: Show all supported pragmas in Variables
|
SQLite: Show all supported pragmas in Variables
|
||||||
|
1
todo.txt
1
todo.txt
@@ -14,7 +14,6 @@ Skinnable plus.gif and other images - http://typo3.org/extensions/repository/vie
|
|||||||
? Branch binary_compile: LZW compression of all texts can save 11 KB, using chars 127-255 in minification can save 1 KB
|
? Branch binary_compile: LZW compression of all texts can save 11 KB, using chars 127-255 in minification can save 1 KB
|
||||||
|
|
||||||
https://github.com/vrana/adminer/compare/master...adminneo-org:adminneo:main
|
https://github.com/vrana/adminer/compare/master...adminneo-org:adminneo:main
|
||||||
MySQL: Do not show 'empty' enum value in strict mode
|
|
||||||
MySQL: Print comments of stored procedures and functions
|
MySQL: Print comments of stored procedures and functions
|
||||||
Add drag-n-drop moving of rows in table editing
|
Add drag-n-drop moving of rows in table editing
|
||||||
PostgreSQL: Show list of schemas in database
|
PostgreSQL: Show list of schemas in database
|
||||||
|
Reference in New Issue
Block a user