Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: DBI and mysql query formatting

by afoken (Prior)
on Dec 08, 2013 at 14:37 UTC ( #1066214=note: print w/ replies, xml ) Need Help??


in reply to Re^3: DBI and mysql query formatting
in thread DBI and mysql query formatting

But the goal of the OP is to have the same order for the $str and $val, not for every run.

That's what values guarantees:

[...] So long as a given hash is unmodified you may rely on keys, values and each to repeatedly return the same order as each other. [...]

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)


Comment on Re^4: DBI and mysql query formatting
Replies are listed 'Best First'.
Re^5: DBI and mysql query formatting
by tangent (Curate) on Dec 08, 2013 at 18:38 UTC
    Ah, like the OP I was never sure about that and had not come across the guarantee you quote.

    I would go with the more complete code you have posted below.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-07-30 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls