summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2012-11-14 18:31:52 +0000
committerNathan Kinkade <nath@nkinka.de>2012-11-14 18:31:52 +0000
commit5174d0ec38a1e991dc138cb2b6cffab8cf81c444 (patch)
tree0830d87ed0049c50445edde2f07909ec73a9ff3e
parenta523b5bb6289e7c5077a972f5a53e40f69cc854c (diff)
Fixed a bug where the Any Word option wasn't working. Not a plural.
-rw-r--r--food_search.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/food_search.php b/food_search.php
index cc413f6..69ff15d 100644
--- a/food_search.php
+++ b/food_search.php
@@ -74,7 +74,7 @@ if ( $_GET['searchType'] == "Exact Phrase" ) {
$where = " WHERE (long_desc = '$searchString' OR comname = '$searchString') ";
$userWhere = " WHERE description = '$searchString' ";
} else {
- # if user selected 'Any Words' or 'All Words' then break up the
+ # if user selected 'Any Word' or 'All Words' then break up the
# search string into an array, then count the array so we know
# how many search strings we are dealing with then go ahead and
# add the first where argument
@@ -240,13 +240,13 @@ if ( $db->_rowCount > 0 ) {
}
}
- # if the search type was 'Any Words', then if only 1 of the search
+ # if the search type was 'Any Word', then if only 1 of the search
# string words matched a word from the field 'foodDesc' we have a
# match and should add the record, else if the search type was
# 'All Words' and all of the search string words matched then add
# the record, else don't add anything.
if (
- (($_GET['searchType'] == "Any Words") && ($matchCount > 0)) ||
+ (($_GET['searchType'] == "Any Word") && ($matchCount > 0)) ||
(($_GET['searchType'] == "All Words") && ($matchCount == count($searchStrings)))
) {
if ( $_GET['sortType'] == "Category" ) {