in reply to Perl hashes: is there some way of adding more data to the value associated with an existing key?
It's generally a lot better (faster, cleaner, clearer) to do this type of stuff in the database. All you need is an aggregate function that concatenates strings with a space delimiter. Here are several ways to do it for PostgreSQL, SQL Server, and MySQL:
String Aggregation in PostgreSQL, SQL Server, and MySQL - Postgres OnLine Journal
With Postgres and DBD::Pg you can get an actual array instead of a delimited string.
--Daniel
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl hashes: is there some way of adding more data to the value associated with an existing key?
by mertserger (Curate) on Jun 08, 2011 at 09:37 UTC | |
by onelesd (Pilgrim) on Jun 09, 2011 at 07:03 UTC |