<?xml version="1.0" encoding="windows-1252"?>
<node id="1010684" title="Re^2: multidimensional array's" created="2012-12-28 05:43:27" updated="2012-12-28 05:43:27">
<type id="11">
note</type>
<author id="880879">
space_monk</author>
<data>
<field name="doctext">
A little known "feature" of &lt;b&gt;fetchall_arrayref&lt;/b&gt; is that it will return an array of hashes if you supply it a hash, and if that hash is empty, it will return all the fields.

&lt;code&gt;
my @allrows = @{ $sth-&gt;fetchrow_arrayref({}) }; # Expand ref, to simplify access
&lt;/code&gt;

&lt;p&gt;YMMV, but I always find it easier to look at &lt;i&gt;$row{language}&lt;/i&gt; than &lt;i&gt;$row&amp;#91;2]&lt;/i&gt;. I'm sure there's a mild performance hit, but as long as it's not incredibly slow I'd opt for clarity.&lt;/p&gt;



&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-880879"&gt;
A Monk aims to give answers to those who have none, and to learn from those who know more.
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1010560</field>
<field name="parent_node">
1010598</field>
</data>
</node>
