Finalize getShippers, along with tests.

This commit is contained in:
Colin Kuskie 2008-02-29 04:03:28 +00:00
parent 1261c96349
commit d780700013
2 changed files with 20 additions and 2 deletions

View file

@ -127,6 +127,14 @@ sub getShippers {
my $session = shift;
WebGUI::Error::InvalidParam->throw(error => q{Must provide a session variable})
unless ref $session eq 'WebGUI::Session';
my $drivers;
my $sth = $session->db->prepare('select shipperId from shipper');
$sth->execute();
while (my $driver = $sth->hashRef()) {
push @{ $drivers }, WebGUI::Shop::Ship->new($session, $driver->{shipperId});
}
$sth->finish;
return $drivers;
}
#-------------------------------------------------------------------