I am working with Pearl, and I am using DBI. So far, I am using -> fetchall_arrayref to get the results of a database query, and accessing the array with only numeric keys. However, I am able to access numerical records by field names (Associate Fact).
How can I do this, and what is the correct syntax to reach the keys?
I would like something like this:
$ data instead of [0] ['name']
:
$ data [0] [1]
work solution
My% data; @ {$ Data {$ id}} {('name')} = 'something';
If you do fetchall_hashref ()
you haveh Are looking for you The keys will be field names from the database. I am a little late and who got it, but it will be.
$ data-> gt; - & gt; {'Field'};
Comments
Post a Comment