automatic wildcard
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-12-02 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* db_search.php3: automatic wildcard
|
||||||
|
|
||||||
2002-12-01 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-12-01 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* libraries/grab_globals.lib.php3: Back to previous version.
|
* libraries/grab_globals.lib.php3: Back to previous version.
|
||||||
|
|
||||||
|
@@ -85,6 +85,7 @@ if (isset($submit_search)) {
|
|||||||
$search_wds_cnt = count($search_words);
|
$search_wds_cnt = count($search_words);
|
||||||
|
|
||||||
$like_or_regex = (($search_option == 4) ? 'REGEXP' : 'LIKE');
|
$like_or_regex = (($search_option == 4) ? 'REGEXP' : 'LIKE');
|
||||||
|
$automatic_wildcard = (($search_option <3) ? '%' : '');
|
||||||
|
|
||||||
for ($i = 0; $i < $search_wds_cnt; $i++) {
|
for ($i = 0; $i < $search_wds_cnt; $i++) {
|
||||||
// Elimines empty values
|
// Elimines empty values
|
||||||
@@ -92,7 +93,10 @@ if (isset($submit_search)) {
|
|||||||
for ($j = 0; $j < $tblfields_cnt; $j++) {
|
for ($j = 0; $j < $tblfields_cnt; $j++) {
|
||||||
$thefieldlikevalue[] = $tblfields[$j]
|
$thefieldlikevalue[] = $tblfields[$j]
|
||||||
. ' ' . $like_or_regex
|
. ' ' . $like_or_regex
|
||||||
. ' \'' . $search_words[$i] . '\'';
|
. ' \''
|
||||||
|
. $automatic_wildcard
|
||||||
|
. $search_words[$i]
|
||||||
|
. $automatic_wildcard . '\'';
|
||||||
} // end for
|
} // end for
|
||||||
|
|
||||||
$fieldslikevalues[] = ($search_wds_cnt > 1)
|
$fieldslikevalues[] = ($search_wds_cnt > 1)
|
||||||
|
Reference in New Issue
Block a user