$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";
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)