in reply to DBI help, aka confused newbie

if i understand what you're asking for, you should be able to use bind_columns and fetch inside a while loop pretty simply:
# Prepare, execute, and bind to the query my $sth = $dbh->prepare("SELECT name,height,width,date FROM mydatabase +"); $sth->execute; $sth->bind_columns(\$name,\$height,\$width,\$date); my %DB; #iterate through the recordset with fetch while( $sth->fetch() ) { if($Sort eq "byname") { $DB{$name} = [$height, $width, $date]; } elsif($Sort eq "bydate") { $DB{$date} = [$height, $width, $filename]; } }