Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 meditating upon the Monastery: (4)
As of 2014-08-02 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (55 votes), past polls