Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Populating an array via a DBI call - simplified

by edimusrex (Monk)
on Mar 29, 2017 at 18:05 UTC ( [id://1186414]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     my @regUsers;
     
    ...
    while ( my @userRows = $sth->fetchrow_array() ) { push @regUsers, @use
    +rRows; }
    
    print join("\n",@regUsers);
    
  2. or download this
    my @users = $dbh->selectall_array("SELECT `UserName` FROM Account a, a
    +sscAccountAccountGroup aaag, asscRoleAccountGroup arag, Role r WHERE 
    +a.Id = aaag.AccountId AND aaag.AccountGroupId = arag.AccountGroupId A
    +ND arag.RoleId = r.Id AND r.Name = 'ROLE_REVIEWER'");
    
    print join("\n",@users);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found