note
hippo
<p>If you use a hashref as the slice arg to [https://metacpan.org/pod/DBI#fetchall_arrayref|fetchall_arrayref] you will receive an AoH rather than an AoA. Then it becomes trivial:</p>
<code>
my $query = $connect->prepare ("SELECT * FROM TableName");
$query->execute ();
my $data = $query->fetchall_arrayref ({});
for my $row (@$data) {
for my $key (keys %$row) {
print "Column name is $key, column value is $row->{$key}\n";
}
}
</code>
<div class="pmsig"><div class="pmsig-885521">
<hr /><p>🦛
</p>
</div></div>
11122167
11122167