$sth = $dbh->prepare("select a, b, c from foo"); $sth->execute; while($row = $sth->fetch) { # $row->[0] is column 'a' # $row->[1] is column 'b', # etc... } #### while(($one, $two, $three) = $sth->fetchrow_array) { # $one, $two and $three are columns a, b and c }