Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Using Tie::IxHash to keep database query keys/values in order

by bradcathey (Prior)
on Feb 15, 2017 at 22:26 UTC ( [id://1182101]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $stmt = "SELECT firstname, lastname, city, state FROM addresses ORD
    +ER BY lastname";
    my $data = $self->dbh->selectall_arrayref($stmt, {Slice => {}});
    
  2. or download this
    [
        {
    ...
            'city'      => 'Miami'
        }
    ];
    
  3. or download this
    
    [
    ...
            'state'     => 'FL'
        }
    ];
    
  4. or download this
    use Tie::IxHash;
    my $data = {};
    ...
    my $stmt = "SELECT firstname, lastname, city, state FROM addresses ORD
    +ER BY lastname";
    $data = $self->dbh->selectall_arrayref($stmt, {Slice => {}});
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found