Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

$dbh->selectall_arrayref to simple @array

by guacamayo (Acolyte)
on Sep 14, 2011 at 14:55 UTC ( [id://925926]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $dbh->selectall_arrayref(
          "SELECT ename FROM emp ORDER BY ename",
          { Slice => {} }
      );
    
  2. or download this
     my $emps = $dbh->selectall_arrayref(
          "SELECT ename FROM emp ORDER BY ename",
    ...
      foreach my $emp ( @$emps ) {
          print "Employee: $emp->{ename}\n";
      }
    
  3. or download this
    @array [ value, value2, value3]
    or
    $string = "value, value2, value3";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://925926]
Approved by Corion
Front-paged by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-16 05:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found