Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Hash arrays

by Anonymous Monk
on Dec 26, 2012 at 08:22 UTC ( [id://1010337]=note: print w/replies, xml ) Need Help??


in reply to Hash arrays

Sure, provide some data in the form of perl variables, and I'll show you how to do it

Replies are listed 'Best First'.
Re^2: Hash arrays
by rkrish (Acolyte) on Dec 26, 2012 at 09:40 UTC
    Here is the code and variables:
    $stmnt = :"select acct_nbr,cycle_cd,cycle_end_dt from usage_rcvd" ; $sth = dbh->prepare($stmt); while ($sth->fetch()) { bind_col(1,$acct_nbr); bind_col(2,$cyc_cd); bind_col(3,$cyc_end); here I need to store them in hash array: key is $acct_nbr values are $cyc_cd and $cyc_end }

      Doesn't look very much like valid perl, sorry, all I can suggest for you is perlintro

        I'm yet to prepare,that is just code snippet to make you understand what i need to do:
        $stmnt = :"select acct_nbr,cycle_cd,cycle_end_dt from usage_rcvd" ; $sth = dbh->prepare($stmt); while ($sth->fetch()) { $sth->bind_col(1,$acct_nbr); $sth->bind_col(2,$cyc_cd); $sth->bind_col(3,$cyc_end); here I need to store them in hash array: key is $acct_nbr values are $cyc_cd and $cyc_end }

Log In?
Username:
Password:

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

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

    No recent polls found