bug #1490569, search with LIKE on numeric fields

This commit is contained in:
Marc Delisle
2006-06-09 19:32:20 +00:00
parent 2c4dac6d05
commit ca2445ce7d
2 changed files with 7 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog
$Id$
$Source$
2006-06-09 Marc Delisle <lem9@users.sourceforge.net>
* tbl_select.php: bug #1490569, search with LIKE on numeric fields
2006-06-08 Marc Delisle <lem9@users.sourceforge.net>
* libraries/header.inc.php: bug #1501891, undefined PMA_isSuperuser() when
the default server is 0

View File

@@ -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 = '';