Backslash is special with LIKE (bug #3344307)

This commit is contained in:
Jakub Vrana 2011-06-29 17:37:57 +02:00
parent 87137e55c9
commit d26fb6276e

View file

@ -278,7 +278,7 @@ function where($where) {
$return = array();
foreach ((array) $where["where"] as $key => $val) {
$return[] = idf_escape(bracket_escape($key, 1)) // 1 - back
. (ereg('\\.', $val) || $jush == "mssql" ? " LIKE " . exact_value(addcslashes($val, "%_")) : " = " . exact_value($val)) // LIKE because of floats, but slow with ints, in MS SQL because of text
. (ereg('\\.', $val) || $jush == "mssql" ? " LIKE " . exact_value(addcslashes($val, "%_\\")) : " = " . exact_value($val)) // LIKE because of floats, but slow with ints, in MS SQL because of text
; //! enum and set
}
foreach ((array) $where["null"] as $key) {