Okay.
This is off the top of my head. I would change sub view_records to be something like this:
# --------------------------------------------------------
my ($status1, @hits1) = &query("view");
$temp{'To'} = $in{'From'};
$temp{'From'} = $in{'To'};
$in{'To'} = $temp{'To'};
$in{'From'} = $temp{'From'};
$in{'Date'} = $in{???};
# I'm not sure what to do here. I'm assuming that the Date field on the
# search form is the date for the outbound flight. In place of the ???
# you'll need to put in the name of the field from the search form that
# holds the date of the return flight.
my ($status2, @hits2) = &query("view");
# at this point, you have the outbound flights in an array called @hits1
# and the return flights in an array called @hits2.
# I don't know what you want to do with them from here. You can
# merge the arrays into one array called @hits and just continue on or
# you can change your display of search results so that both sets of
# flights would show at the same time, maybe in columns in a table
# or something.
# I also don't know what you want to do if the search comes back
# fine for one of them but not the other.
if ($status eq "ok") {
&html_view_success(@hits);
}
else {
&html_view_failure($status);
}
}
Maybe this will give you some ideas and you can finish it on your own.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
This is off the top of my head. I would change sub view_records to be something like this:
Code:
sub view_records { # --------------------------------------------------------
my ($status1, @hits1) = &query("view");
$temp{'To'} = $in{'From'};
$temp{'From'} = $in{'To'};
$in{'To'} = $temp{'To'};
$in{'From'} = $temp{'From'};
$in{'Date'} = $in{???};
# I'm not sure what to do here. I'm assuming that the Date field on the
# search form is the date for the outbound flight. In place of the ???
# you'll need to put in the name of the field from the search form that
# holds the date of the return flight.
my ($status2, @hits2) = &query("view");
# at this point, you have the outbound flights in an array called @hits1
# and the return flights in an array called @hits2.
# I don't know what you want to do with them from here. You can
# merge the arrays into one array called @hits and just continue on or
# you can change your display of search results so that both sets of
# flights would show at the same time, maybe in columns in a table
# or something.
# I also don't know what you want to do if the search comes back
# fine for one of them but not the other.
if ($status eq "ok") {
&html_view_success(@hits);
}
else {
&html_view_failure($status);
}
}
Maybe this will give you some ideas and you can finish it on your own.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.