my $stmt="SELECT distinct name FROM storeCategories"; my $names = $dbh->selectrow_hashref($stmt, undef, $id);