Gossamer Forum
Home : Products : DBMan : Installation :

Range searches

Quote Reply
Range searches
Hi JP,
I need help with my problem,
I have a drop down list, which contains all the fields the user searches on and another option which indicates whether the search is greater or lesser than etc my search option looks like this
<SELECT NAME="rs">
<OPTION>---
~; for(my $i=1; $i<= $#db_cols; $i++){print qq~<OPTION VALUE="$db_cols[$i]">$db_cols[$i]</OPTION>\n~ if ($db_form_len{$db_cols[$i]} >= 0); } print qq~
</SELECT>
<SELECT NAME="co">
<OPTION VALUE=">=">Greater Than
<OPTION VALUE="<=">Less Than
</SELECT>
<INPUT TYPE="TEXT" NAME="rs-gt" SIZE=15 MAXLENGTH=255><br>
<SELECT NAME="pc">
<OPTION VALUE="&">AND
<OPTION VALUE="|">OR
</SELECT>
<SELECT NAME="ct">
<OPTION VALUE=">=">Greater Than
<OPTION VALUE="<=">Less Than
</SELECT>
<INPUT TYPE="TEXT" NAME="inputto" SIZE=1MAXLENGTH=255><br>
I can make the first part working by using

$in{$in{'rs'}}= $in{'inputo'}
if($in{'co'} eq ">="){
$in{$in{'rs'}=">".$in{'inputo'};}
if($in{'co'} eq "<="){
$in{$in{'rs'}="<".$in{'inputo'};}

I can get the fisrt part working.
but how do I make the second part working how do I set it such that it recognises that I am searching for a range and make the serach accordingly.Any Clues will be greatly greatly appreciated
I dont know if I am clear at all.
Your help wil be greatly appreciated.

------------------
smithan2
Subject Author Views Date
Thread Range searches smithan2 2176 Jun 17, 1999, 6:11 AM
Post Re: Range searches
smithan2 2044 Jun 16, 1999, 9:40 PM
Post Re: Range searches
JPDeni 2065 Jun 17, 1999, 8:51 AM
Post Re: Range searches
JPDeni 2053 Jun 17, 1999, 12:58 PM
Post Re: Range searches
smithan2 2063 Jun 18, 1999, 2:55 AM
Post Re: Range searches
JPDeni 2064 Jun 18, 1999, 8:09 AM