I'm going nuts with the references here.... can anyone give me
a sanity check? How do I get the data out of the address array?
all I get is:
Home Phone: ARRAY(0x83a0f88)
my @address = @{ getAddress($clientID)};
my $homePhone = $address[0] || "n/a";
sub getAddress {
my ($clientID) = @_;
use PfTV::Auth;
my $auth = new PfTV::Auth;
my $dbh = DBI->connect($auth->dsn,$auth->username,$auth->password) || die "COULDN'T
CONNECT";
my $sql = "select AddressID, ClientID, StatusID, Street, City, State, ZipCode,
HomePhone, CellPhone, Pager, Fax, WorkPhone from Addresses WHERE ClientID =
$clientID";
my $sth = $dbh->prepare($sql);
$sth->execute;
return $sth->fetchall_arrayref;
}
Thanks in advance for any help,
John