I want my users to be able to search on certain fields that contain 0 (the number zero). But they get "search term not specified" eror message. Any way around this?
Re: [RogerSolo] 0 (zero) returns "No search terms specified"In reply to
0 is interpreted as NULL or undefined so the script will think nothing is entered.
In sub query try changing:
# If we don't have anything to search on, let's complain. if (!@search_fields and !@search_gt_fields and !@search_lt_fields) { return "no search terms specified"; }
to:
# If we don't have anything to search on, let's complain. if (!@search_fields and !@search_gt_fields and !@search_lt_fields and grep { !/0/ } @search_fields) { return "no search terms specified"; }