Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Reverse engineering some code :(

by ysth (Canon)
on Jun 21, 2009 at 06:39 UTC ( #773332=note: print w/replies, xml ) Need Help??

in reply to Reverse engineering some code :(

See the doc. selectall_hashref returns a reference to a hash where the values are hashrefs, each containing all the columns from one row, and the keys are one of the columns, which you identify with the $keyfield parameter. That call seems to be missing the $keyfield (which I'm guessing would be "nick").

Looking at how get_score is used in, it seems that it should be returning a reference to an array of hashrefs instead, which you would do like:

return $obj->{dbh}->selectall_arrayref("SELECT * FROM scores", { S +lice => {} }) };

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://773332]
[ww]: ++ all (phony labels re "gaming"
[1nickt]: ambrus perhaps you know where the keys are?
[ww]: OTOH, -- for ads suggesting that being good at games is somehow eq "greatness"
[ambrus]: 1nickg: obviously the gamers don't know. but anyway, I need the whole room backlit, because watching a monitor in a dark room (like many people do) is tiring for my eyes, even more so than doing it in a lit room.
[1nickt]: ambrus I agree. I suspect one's eyes are always trying to adjust across the boundary between very bright and very dark ... like a camera's autofocus struggling to choose the target.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (18)
As of 2017-03-27 13:55 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.