How ??
Aug 18, 2000, 5:05 PM
Veteran / Moderator (8669 posts)
Aug 18, 2000, 5:05 PM
Post #2 of 7
Views: 1744
Set your search term to one less than you want to search for.
If you want to search for "greater than or equal to" 4 set your "greater than" search to 3.
JPD
http://www.jpdeni.com/dbman/
If you want to search for "greater than or equal to" 4 set your "greater than" search to 3.
JPD
http://www.jpdeni.com/dbman/
Aug 18, 2000, 5:20 PM
Novice (11 posts)
Aug 18, 2000, 5:20 PM
Post #3 of 7
Views: 1730
Thanks for your reply. I kinda figured that out but I don't think my client's customers will. They are going to search for specific gems (diamonds, etc.) within a certain price range and a certain weight range. They're most likely going to want to search by their minimum weight (eg. 1.5 carats) and a maximum weight of (eg. 3 carats). I really can't rely on them to put > 1.49 and < 3.01.
Any way to fake the code? or maybe an OnClick() javascript?
Thanks!
Pete
Any way to fake the code? or maybe an OnClick() javascript?
Thanks!
Pete
Aug 18, 2000, 7:38 PM
Veteran / Moderator (8669 posts)
Aug 18, 2000, 7:38 PM
Post #4 of 7
Views: 1729
I gave a short answer to a short question.
You can alter sub query. Something like:
if ($in{'Carat-gt'}) { $in{'Carat-gt'} = $in{'Carat-gt} - .01; }
if ($in{'Carat-lt'}) { $in{'Carat-lt'} = $in{'Carat-lt} + .01; }
This would go just after
local (%sortby);
JPD
http://www.jpdeni.com/dbman/

You can alter sub query. Something like:
Code:
if ($in{'Carat-gt'}) { $in{'Carat-gt'} = $in{'Carat-gt} - .01; }
if ($in{'Carat-lt'}) { $in{'Carat-lt'} = $in{'Carat-lt} + .01; }
This would go just after
local (%sortby);
JPD
http://www.jpdeni.com/dbman/
Aug 18, 2000, 8:52 PM
Novice (11 posts)
Aug 18, 2000, 8:52 PM
Post #6 of 7
Views: 1721
my ($i, $column, @search_fields, @search_gt_fields, @search_lt_fields, $maxhits, $numhits, $nh,
$field, @regexp, $line, @values, $key_match, @hits, @sortedhits, $next_url, $next_hit, $prev_hit,
$first, $last, $upper, $lower, $left, $right, $restricted);
local (%sortby);
if ($in{'Carat-gt'}) {
$in{'Carat-gt'} = $in{'Carat-gt} - .01; }
if ($in{'Carat-lt'}) {
$in{'Carat-lt'} = $in{'Carat-lt} + .01; }
$field, @regexp, $line, @values, $key_match, @hits, @sortedhits, $next_url, $next_hit, $prev_hit,
$first, $last, $upper, $lower, $left, $right, $restricted);
local (%sortby);
if ($in{'Carat-gt'}) {
$in{'Carat-gt'} = $in{'Carat-gt} - .01; }
if ($in{'Carat-lt'}) {
$in{'Carat-lt'} = $in{'Carat-lt} + .01; }
Aug 18, 2000, 11:07 PM
Veteran / Moderator (8669 posts)
Aug 18, 2000, 11:07 PM
Post #7 of 7
Views: 1711
I'm sorry. I left out some quotation marks
if ($in{'Carat-gt'}) { $in{'Carat-gt'} = $in{'Carat-gt'} - .01; }
if ($in{'Carat-lt'}) {$in{'Carat-lt'} = $in{'Carat-lt'} + .01; }
Of course, this is assuming that you have a field called Carat in your .cfg file and fields called Carat-gt and Carat-lt on your search form.
JPD
http://www.jpdeni.com/dbman/
Code:
if ($in{'Carat-gt'}) { $in{'Carat-gt'} = $in{'Carat-gt'} - .01; }
if ($in{'Carat-lt'}) {$in{'Carat-lt'} = $in{'Carat-lt'} + .01; }
JPD
http://www.jpdeni.com/dbman/