]> git.joonet.de Git - adminer.git/commitdiff
Don't use LIKE for numbers in SQLite (bug #3420408)
authorJakub Vrana <jakub@vrana.cz>
Thu, 22 Dec 2011 08:32:42 +0000 (00:32 -0800)
committerJakub Vrana <jakub@vrana.cz>
Thu, 22 Dec 2011 08:32:42 +0000 (00:32 -0800)
adminer/include/functions.inc.php
changes.txt

index 78745f363fe0798fbe15c18ab1986ddcaf10ac7c..e49b2501885bb017e047c0ff5a34aa649e42a4e7 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") && $jush != "pgsql" ? " LIKE " . exact_value(addcslashes($val, "%_\\")) : " = " . exact_value($val)) // LIKE because of floats, but slow with ints, in MS SQL because of text
+                       . (($jush == "sql" && 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) {
index ee578957fce1e41308cfa7529004a6f9ab9cef04..aa22ba9f6f26fcae2fa76446e1aa5c663cb3e5a0 100644 (file)
@@ -9,7 +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, SQLite: don't use LIKE for numbers (bug #3420408)
 PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
 Boolean search (Editor)
 Persian translation