]> git.joonet.de Git - adminer.git/commitdiff
Use = instead of LIKE where possible
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 10 Feb 2010 15:42:07 +0000 (15:42 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 10 Feb 2010 15:42:07 +0000 (15:42 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1307 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/functions.inc.php

index 833e99754d2ac755a140e41f7f2a497c40af6cba..888d46e43b6e0fe0d1a07771a08c734839eb42d6 100644 (file)
@@ -167,7 +167,7 @@ function where($where) {
        $return = array();
        foreach ((array) $where["where"] as $key => $val) {
                $key = bracket_escape($key, "back");
-               $return[] = (preg_match('~^[A-Z0-9_]+\\(`(?:[^`]|``)+`\\)$~', $key) ? $key : idf_escape($key)) . " LIKE " . exact_value(addcslashes($val, "%_")); // LIKE because of floats //! enum and set, columns looking like functions
+               $return[] = (preg_match('~^[A-Z0-9_]+\\(`(?:[^`]|``)+`\\)$~', $key) ? $key : idf_escape($key)) . (ereg('\\.', $val) ? " LIKE " . exact_value(addcslashes($val, "%_")) : " = " . exact_value($val)); // LIKE because of floats, but slow with ints //! enum and set, columns looking like functions
        }
        foreach ((array) $where["null"] as $key) {
                $key = bracket_escape($key, "back");