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. calendar.
2004-04-27 Garvin Hicking <pma@supergarv.de> 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 * read_dump.php: Bug #925913 - Uploading with UploadDir/open_basedir
fails. fails.
* querywindow.php: Bug #942395 - Missing space * 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 * LIKE works also on integers and dates so I added it in numfunctions
*/ */
$numfunctions = array('=', '>', '>=', '<', '<=', '!=', 'LIKE', 'NOT LIKE'); $numfunctions = array('=', '>', '>=', '<', '<=', '!=', 'LIKE', 'NOT LIKE');
$textfunctions = array('LIKE', 'NOT LIKE', '=', '!='); $textfunctions = array('LIKE', 'NOT LIKE', '=', '!=', 'REGEXP', 'NOT REGEXP');
$enumfunctions = array('=', '!='); $enumfunctions = array('=', '!=');
$nullfunctions = array('IS NULL', 'IS NOT NULL'); $nullfunctions = array('IS NULL', 'IS NOT NULL');
$unaryfunctions = array( $unaryfunctions = array(
@@ -67,7 +67,7 @@ if (!isset($param) || $param[0] == '') {
$fields_list[] = $row['Field']; $fields_list[] = $row['Field'];
$type = $row['Type']; $type = $row['Type'];
// reformat mysql query output - staybyte - 9. June 2001 // 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) { || strncasecmp($type, 'enum', 4) == 0) {
$type = str_replace(',', ', ', $type); $type = str_replace(',', ', ', $type);
} else { } else {
@@ -102,7 +102,7 @@ if (!isset($param) || $param[0] == '') {
<!-- <!--
function PMA_tbl_select_operator(f, index, multiple) { function PMA_tbl_select_operator(f, index, multiple) {
switch (f.elements["func[" + index + "]"].options[f.elements["func[" + index + "]"].selectedIndex].value) { switch (f.elements["func[" + index + "]"].options[f.elements["func[" + index + "]"].selectedIndex].value) {
<?php <?php
reset($unaryfunctions); reset($unaryfunctions);
while (list($operator) = each($unaryfunctions)) { while (list($operator) = each($unaryfunctions)) {
echo ' case "' . $operator . "\":\r\n"; echo ' case "' . $operator . "\":\r\n";
@@ -319,12 +319,12 @@ else {
$func_type = $func[$i] = 'IN'; $func_type = $func[$i] = 'IN';
$parens_open = '('; $parens_open = '(';
$parens_close = ')'; $parens_close = ')';
} elseif ($func_type == '!=' && $enum_selected_count > 1) { } elseif ($func_type == '!=' && $enum_selected_count > 1) {
$func_type = $func[$i] = 'NOT IN'; $func_type = $func[$i] = 'NOT IN';
$parens_open = '('; $parens_open = '(';
$parens_close = ')'; $parens_close = ')';
} else { } else {
$parens_open = ''; $parens_open = '';
$parens_close = ''; $parens_close = '';
@@ -347,7 +347,7 @@ else {
} // end if } // end if
} // end for } // end for
if ($w) { if ($w) {
$sql_query .= ' WHERE ' . implode(' AND ', $w); $sql_query .= ' WHERE ' . implode(' AND ', $w);
} }