Argh. I've got the following:
$sth->execute;
$ref = $sth->fetchrow_hashref();
$sth->finish;
To throw the contents of one row into a hash %ref. However, I can't seem to be able to access that hash? I've tried:
print "$row_ref ";
}
But that doesn't seem to work. Any help would be appreciated? How do I loop through my hash :-\
- wil
Code:
$sth = $dbh->prepare("SELECT * FROM $DB_MYSQL_NAME WHERE id = '$res_id'"); $sth->execute;
$ref = $sth->fetchrow_hashref();
$sth->finish;
To throw the contents of one row into a hash %ref. However, I can't seem to be able to access that hash? I've tried:
Code:
foreach $row_ref (keys %ref}) { print "$row_ref ";
}
But that doesn't seem to work. Any help would be appreciated? How do I loop through my hash :-\
- wil