Spidy has asked for the wisdom of the Perl Monks concerning the following question:
For a project I've been working on lately, we have a MySQL table set out like this:
| id | link_id | descr |
And what we're trying to do is retrieve the values of id and descr for any rows that have the same link_id. We want to store all of the data retrieved in an array of hashes upon retrieving it, so that later on we can use a foreach loop on the array to loop through our results and generate the HTML that we need. Does anyone know of a way that I could do this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI: Build array of hashes with fetched results?
by jZed (Prior) on Feb 18, 2007 at 00:59 UTC | |
|
Re: DBI: Build array of hashes with fetched results?
by punkish (Priest) on Feb 18, 2007 at 06:31 UTC | |
|
Re: DBI: Build array of hashes with fetched results?
by jettero (Monsignor) on Feb 17, 2007 at 23:15 UTC | |
by jZed (Prior) on Feb 18, 2007 at 01:03 UTC |