Using Perl and DBI to get data from SQL database. I am using the code below to get data from a table. Instead of defining 3 different arrays, is there a way to define an array with multiple fields?
$sql = "select * from tblPeople where PersonID=?";
$sth = $dbh->prepare($sql);
$sth->execute($PID);
while ($DRow = $sth->fetchrow_hashref) {
push @KnownPIDs, $DRow->{PersonID};
push @Knownoss, $DRow->{currentpos};
push @Knownnotes, $DRow->{personnotes};
}