Home : Products : DBMan : Customization :

Products: DBMan: Customization: Re: [Jeff-C] range search: change greater than, less than into from, to search?: Edit Log

Here is the list of edits for this post
Re: [Jeff-C] range search: change greater than, less than into from, to search?
Look for
Code:
# Greater then searches.
foreach $field (@search_gt_fields) {
$term = $in{"$db_cols[$field]-gt"};

add
Code:
if ($db_sort{$db_cols[$field]} eq 'numer') {
$term = $term - 1;
}

A little below that, look for
Code:
# Less then searches.
foreach $field (@search_lt_fields) {
$term = $in{"$db_cols[$field]-lt"};

add
Code:
if ($db_sort{$db_cols[$field]} eq 'numer') {
$term = $term + 1;
}

This will only work for numeric values. Dates and characters are a whole lot more complicated.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.

Last edited by:

JPDeni: Aug 20, 2005, 8:42 PM

Edit Log: