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
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