in reply to Recursive hash assignment
The data comes off of the database into an array, which is hashed using the column names determined earlier as keys. This gives a (temporary) hash with the following structure (called %tblData in the above):
$tblData{$columnname} = data from array
for each column name.
This then needs to be added to a permenent hash (called %tableData above) keyed on one or more of these column names, the keys being provided by the user. (it's part of a sub that takes a table name and list of keys and returns a hash). This should give the structure:
%{$tableData{$key1}{$key2}{$key3}} = %tblData
ie creating a hash of hashes which could be accessed using, for example,
my $data = $tableData{$key1}{$key2}{$key3}{$columnname}.
--Foxcub.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Data for 2 keys ..
by Tanalis (Curate) on Sep 05, 2002 at 09:53 UTC |