Fix timestamp in uva condition with MySQL 4.1 (bug #1097593).

This commit is contained in:
Michal Čihař
2005-01-07 11:58:32 +00:00
parent 479635e791
commit ede2a6ee5d
2 changed files with 9 additions and 6 deletions

View File

@@ -11,6 +11,8 @@ $Source$
libraries/keyhandler.js: Use Option key for Safari for moving (bug libraries/keyhandler.js: Use Option key for Safari for moving (bug
#1094137), move key handler function to separate file so we have only #1094137), move key handler function to separate file so we have only
one, make movement work correctly in vertical display of properties. one, make movement work correctly in vertical display of properties.
* libraries/common.lib.php: Fix timestamp in uva condition with MySQL 4.1
(bug #1097593).
2005-01-06 Marc Delisle <lem9@users.sourceforge.net> 2005-01-06 Marc Delisle <lem9@users.sourceforge.net>
* tbl_change.php: removed old PHP3-workaround that caused problems * tbl_change.php: removed old PHP3-workaround that caused problems

View File

@@ -2333,7 +2333,8 @@ if (typeof(document.getElementById) != 'undefined'
if (!isset($row[$i]) || is_null($row[$i])) { if (!isset($row[$i]) || is_null($row[$i])) {
$condition .= 'IS NULL AND'; $condition .= 'IS NULL AND';
} else { } else {
if ($meta->numeric) { // timestamp is numeric on some MySQL 4.1
if ($meta->numeric && $meta->type != 'timestamp') {
$condition .= '= ' . $row[$i] . ' AND'; $condition .= '= ' . $row[$i] . ' AND';
} elseif ($meta->type == 'blob' } elseif ($meta->type == 'blob'
// hexify only if this is a true not empty BLOB // hexify only if this is a true not empty BLOB