MySQL: Allow editing rows identified by negative floats (bug #695)
This commit is contained in:
parent
b7641a2d13
commit
364e032b69
|
@ -479,10 +479,10 @@ function where($where, $fields = array()) {
|
|||
$key = bracket_escape($key, 1); // 1 - back
|
||||
$column = escape_key($key);
|
||||
$return[] = $column
|
||||
. ($jush == "sql" && preg_match('~^[0-9]*\.[0-9]*$~', $val) ? " LIKE " . q(addcslashes($val, "%_\\"))
|
||||
: ($jush == "mssql" ? " LIKE " . q(preg_replace('~[_%[]~', '[\0]', $val))
|
||||
. ($jush == "sql" && is_numeric($val) && preg_match('~\.~', $val) ? " LIKE " . q($val) // LIKE because of floats but slow with ints
|
||||
: ($jush == "mssql" ? " LIKE " . q(preg_replace('~[_%[]~', '[\0]', $val)) // LIKE because of text
|
||||
: " = " . unconvert_field($fields[$key], q($val))
|
||||
)) // LIKE because of floats but slow with ints, in MS SQL because of text
|
||||
))
|
||||
; //! enum and set
|
||||
if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
|
||||
$return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Adminer 4.7.3-dev:
|
||||
MySQL: Speed up displaying tables in large databases (bug #700)
|
||||
MySQL: Allow editing rows identified by negative floats (bug #695)
|
||||
MySQL: Skip editing generated columns
|
||||
SQLite: Quote strings stored in integer columns in export (bug #696)
|
||||
|
||||
|
|
Loading…
Reference in a new issue