Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Hash table

by rpnoble419 (Pilgrim)
on Sep 09, 2012 at 16:53 UTC ( #992608=note: print w/ replies, xml ) Need Help??


in reply to Hash table

I agree with moritz. But having had to produce what you are asking for, I use a counter to create the hash key when reading through your database return. You can create the unique key as part of your select by creating a row counter, but understand that the row counter will change based on the result of your search. You can also add a counter to the hash as part of your assignment to the hash.

Code to create a row counter in MySQL

SET @key := 0; select @key := @key + 1, DataElementToSelect from Database.Table;


Comment on Re: Hash table
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2014-12-25 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls