[asterisk-users] Can someone give a plain english explanation of the HASH function?

Alex Balashov abalashov at evaristesys.com
Sat Sep 13 22:29:24 CDT 2008


Tilghman Lesher wrote:
> On Saturday 13 September 2008 21:14:24 Alex Balashov wrote:
>> On Sat, September 13, 2008 10:08 pm, Tilghman Lesher wrote:
>>> Basically, it's a way to retrieve multiple values from a database without
>>> using ARRAY() to enumerate each field, but also without polluting the
>>> variable namespace, which could cause unexpected behavior, such as when
>>> somebody adds a field to a database table whose name happens to coincide
>>> with an existing variable.
>> Or when the domain of keys you want to use for suitable or desirable
>> variable names does not make.  :)
> 
> Oh, you mean like a table column name that starts with an underscore?  That's
> the only case I can think of where that wouldn't work out well.

I would have thought the HASH() function can take as a key parameter 
various types of data, including multidimensional kinds, or something 
that looks Asdiuhadiu12b34918h213i1u3h19833n3iu, which, while usable as 
a string key, is undesirable to have, recall, store, or reference as a key.


-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-users mailing list