Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Populating an array via a DBI call - simplified

by edimusrex (Monk)
on Mar 29, 2017 at 18:05 UTC ( #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
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? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2021-06-25 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (134 votes). Check out past polls.

    Notices?