Patch 939197

This commit is contained in:
Marc Delisle
2004-05-05 17:24:52 +00:00
parent 2727d06dd9
commit 46a0e882be
2 changed files with 11 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-05-05 Marc Delisle <lem9@users.sourceforge.net>
* tbl_select.php: patch #939197, new choice of operator LIKE %...%
because this syntax is so often used, thanks to Ruben Barkow (rubo77)
2004-05-05 Garvin Hicking <pma@supergarv.de>
* db_details_db_info.php, db_details_structure.php, left.php: Speed
up table fetching when using $cfg['ShowTooltips']. Allow to only

View File

@@ -37,7 +37,7 @@ if ($cfg['PropertiesIconic'] == true) {
* LIKE works also on integers and dates so I added it in numfunctions
*/
$numfunctions = array('=', '>', '>=', '<', '<=', '!=', 'LIKE', 'NOT LIKE');
$textfunctions = array('LIKE', 'NOT LIKE', '=', '!=', 'REGEXP', 'NOT REGEXP');
$textfunctions = array('LIKE %...%','LIKE', 'NOT LIKE', '=', '!=', 'REGEXP', 'NOT REGEXP');
$enumfunctions = array('=', '!=');
$nullfunctions = array('IS NULL', 'IS NOT NULL');
$unaryfunctions = array(
@@ -341,6 +341,12 @@ else {
} else {
$quot = '';
}
// LIKE %...%
if ($func_type == 'LIKE %...%') {
$func_type = 'LIKE';
$fields[$i] = '%' . $fields[$i] . '%';
}
$w[] = PMA_backquote(urldecode($names[$i])) . ' ' . $func_type . ' ' . $quot . PMA_sqlAddslashes($fields[$i]) . $quot;
} // end if