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

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;

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2016-10-28 20:04 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (387 votes). Check out past polls.