sql_mode NO_FIELD_OPTIONS should be disabled
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@333 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
7d7e10be08
commit
7ce79142c0
|
@ -85,6 +85,7 @@ if ($fields) {
|
||||||
if (isset($_GET["default"]) && $field["type"] == "timestamp") {
|
if (isset($_GET["default"]) && $field["type"] == "timestamp") {
|
||||||
$id = htmlspecialchars("on_update-$name");
|
$id = htmlspecialchars("on_update-$name");
|
||||||
if (!isset($create) && !$_POST) {
|
if (!isset($create) && !$_POST) {
|
||||||
|
//! disable sql_mode NO_FIELD_OPTIONS
|
||||||
$create = $mysql->result($mysql->query("SHOW CREATE TABLE " . idf_escape($_GET["edit"])), 1);
|
$create = $mysql->result($mysql->query("SHOW CREATE TABLE " . idf_escape($_GET["edit"])), 1);
|
||||||
}
|
}
|
||||||
$checked = ($_POST ? $_POST["on_update"][bracket_escape($name)] : preg_match("~\n\\s*" . preg_quote(idf_escape($name), '~') . " timestamp.* on update CURRENT_TIMESTAMP~i", $create));
|
$checked = ($_POST ? $_POST["on_update"][bracket_escape($name)] : preg_match("~\n\\s*" . preg_quote(idf_escape($name), '~') . " timestamp.* on update CURRENT_TIMESTAMP~i", $create));
|
||||||
|
|
Loading…
Reference in a new issue