Backslash is special with LIKE (bug #3344307)
This commit is contained in:
parent
87137e55c9
commit
d26fb6276e
|
@ -278,7 +278,7 @@ function where($where) {
|
||||||
$return = array();
|
$return = array();
|
||||||
foreach ((array) $where["where"] as $key => $val) {
|
foreach ((array) $where["where"] as $key => $val) {
|
||||||
$return[] = idf_escape(bracket_escape($key, 1)) // 1 - back
|
$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
|
; //! enum and set
|
||||||
}
|
}
|
||||||
foreach ((array) $where["null"] as $key) {
|
foreach ((array) $where["null"] as $key) {
|
||||||
|
|
Loading…
Reference in a new issue