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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2018-03-20 08:43 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (248 votes). Check out past polls.