]> git.joonet.de Git - adminer.git/commitdiff
Compare floats as strings (bug #2886518)
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 26 Oct 2009 16:13:42 +0000 (16:13 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 26 Oct 2009 16:13:42 +0000 (16:13 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1215 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/functions.inc.php

index dade066504597b766a5cb6af2682f3a166243a06..8a6b440299a4158e9912f43d1a5ac4b64ad58933 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)) . " = " . exact_value($val); //! enum and set, columns looking like functions
+               $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
        }
        foreach ((array) $where["null"] as $key) {
                $key = bracket_escape($key, "back");