my $sth_1 = $dbh->prepare("SELECT * FROM vote WHERE item_no='$last_item'"); $sth_1->execute(); while (my @row = $sth_1->fetchrow_array()) { #### Define variables from the mySQL output. my $description = $row[4]; my %results = ("$row[5]","$row[11]","$row[6]","$row[12]","$row[7]","$row[13]","$row[8]","$row[14]","$row[9]","$row[15]","$row[10]","$row[16]");