]> git.joonet.de Git - adminer.git/commitdiff
Use LIKE for text comparison in MS SQL (bug #3088222)
authorJakub Vrana <jakub@vrana.cz>
Sat, 16 Oct 2010 14:31:01 +0000 (16:31 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sat, 16 Oct 2010 14:31:01 +0000 (16:31 +0200)
adminer/include/functions.inc.php

index 34feeb32ee5f312c27991f17245ad77180cea549..ea81a1c914e08a70d50419631e6f37d52237939a 100644 (file)
@@ -237,10 +237,11 @@ function unique_array($row, $indexes) {
 * @return string
 */
 function where($where) {
+       global $jush;
        $return = array();
        foreach ((array) $where["where"] as $key => $val) {
                $return[] = idf_escape(bracket_escape($key, 1)) // 1 - back
-                       . (ereg('\\.', $val) ? " LIKE " . exact_value(addcslashes($val, "%_")) : " = " . exact_value($val)) // LIKE because of floats, but slow with ints
+                       . (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) {