$sth = $dbh->selectrow_array(qq{select * from `members` where `USERNAME` = ? LIMIT 1}); $sth->execute($_un); my $_mbrInfo = $sth->fetchrow_hashref(); $sth->finish(); # Got member record, now get their billing address: $sth = $dbh->prepare(qq{select * from `shippingAddresses` where `mid` = ?}); $sth->execute($_mbrInfo->{mid}); my $_addy = $sth->fetchrow_hashref(); $sth->finish();