RFE #940194 - Added REGEXP to search options

This commit is contained in:
Garvin Hicking
2004-04-27 11:10:31 +00:00
parent 49726bd3e6
commit 534cb1f08a
2 changed files with 7 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ $Source$
calendar.
2004-04-27 Garvin Hicking <pma@supergarv.de>
* tbl_select.php: RFE #940194 - Add REGEXP to table search options
* read_dump.php: Bug #925913 - Uploading with UploadDir/open_basedir
fails.
* querywindow.php: Bug #942395 - Missing space

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', '=', '!=');
$textfunctions = array('LIKE', 'NOT LIKE', '=', '!=', 'REGEXP', 'NOT REGEXP');
$enumfunctions = array('=', '!=');
$nullfunctions = array('IS NULL', 'IS NOT NULL');
$unaryfunctions = array(
@@ -67,7 +67,7 @@ if (!isset($param) || $param[0] == '') {
$fields_list[] = $row['Field'];
$type = $row['Type'];
// reformat mysql query output - staybyte - 9. June 2001
if (strncasecmp($type, 'set', 3) == 0
if (strncasecmp($type, 'set', 3) == 0
|| strncasecmp($type, 'enum', 4) == 0) {
$type = str_replace(',', ', ', $type);
} else {
@@ -102,7 +102,7 @@ if (!isset($param) || $param[0] == '') {
<!--
function PMA_tbl_select_operator(f, index, multiple) {
switch (f.elements["func[" + index + "]"].options[f.elements["func[" + index + "]"].selectedIndex].value) {
<?php
<?php
reset($unaryfunctions);
while (list($operator) = each($unaryfunctions)) {
echo ' case "' . $operator . "\":\r\n";
@@ -319,12 +319,12 @@ else {
$func_type = $func[$i] = 'IN';
$parens_open = '(';
$parens_close = ')';
} elseif ($func_type == '!=' && $enum_selected_count > 1) {
$func_type = $func[$i] = 'NOT IN';
$parens_open = '(';
$parens_close = ')';
} else {
$parens_open = '';
$parens_close = '';
@@ -347,7 +347,7 @@ else {
} // end if
} // end for
if ($w) {
$sql_query .= ' WHERE ' . implode(' AND ', $w);
}