diff --git a/ChangeLog b/ChangeLog index 4614eb865..d2102ec74 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-06-09 Marc Delisle + * tbl_select.php: bug #1490569, search with LIKE on numeric fields + 2006-06-08 Marc Delisle * libraries/header.inc.php: bug #1501891, undefined PMA_isSuperuser() when the default server is 0 diff --git a/tbl_select.php b/tbl_select.php index b66ad38d6..a984663c6 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -380,7 +380,10 @@ else { } } elseif ($fields[$i] != '') { - if (preg_match('@char|binary|blob|text|set|date|time|year@i', $types[$i])) { + // For these types we quote the value. Even if it's another type (like INT), + // for a LIKE we always quote the value. MySQL converts strings to numbers + // and numbers to strings as necessary during the comparison + if (preg_match('@char|binary|blob|text|set|date|time|year@i', $types[$i]) || strpos(' ' . $func_type, 'LIKE')) { $quot = '\''; } else { $quot = '';