]> git.joonet.de Git - adminer.git/commitdiff
Don't use LIKE for numbers (http://forum.zdrojak.root.cz/index.php?topic=567)
authorJakub Vrana <jakub@vrana.cz>
Thu, 22 Dec 2011 07:35:50 +0000 (23:35 -0800)
committerJakub Vrana <jakub@vrana.cz>
Thu, 22 Dec 2011 07:35:50 +0000 (23:35 -0800)
adminer/include/functions.inc.php
changes.txt

index 9a5c40bb93adb2f9cc8809b142105f4ff6bd96a5..78745f363fe0798fbe15c18ab1986ddcaf10ac7c 100644 (file)
@@ -337,7 +337,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") && $jush != "pgsql" ? " 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) {
index a87aaa6fa5e5231761280557d35690190315aa09..ee578957fce1e41308cfa7529004a6f9ab9cef04 100644 (file)
@@ -9,6 +9,7 @@ Esc to cancel AJAX request
 Ability to disable export (customization)
 MySQL: set autocommit after connect
 PostgreSQL: fix alter foreign key
+PostgreSQL: don't use LIKE for numbers
 PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
 Boolean search (Editor)
 Persian translation