1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Compatibility with MySQL 5.6

This commit is contained in:
Jakub Vrana
2013-02-19 16:57:04 -08:00
parent 356cadf2b2
commit 2b2d6987ef
5 changed files with 8 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ if (!$fields) {
$value = $adminer->editVal($value, $field);
}
$function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($update && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : ($value !== null ? '' : 'NULL'))));
if ($field["type"] == "timestamp" && $value == "CURRENT_TIMESTAMP") {
if (ereg("time", $field["type"]) && $value == "CURRENT_TIMESTAMP") {
$value = "";
$function = "now";
}