mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
MySQL: Fix editing rows by binary values (bug #371)
This commit is contained in:
@@ -385,7 +385,7 @@ function where($where, $fields = array()) {
|
||||
: " = " . 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("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
|
||||
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 utf8_bin";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user