Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: Retrieving multiple records from databaseby jZed (Prior) |
on Oct 16, 2004 at 19:07 UTC ( [id://399797]=note: print w/replies, xml ) | Need Help?? |
My next question is why does fetchrow_array() only return an array of 1 element, but fetchall_arrayref({}) nabs them all? Well the difference between fetch*row* and fetch*all* explains why fetchrow gets just one row and fetchall gets them all. The difference between fetchrow_*array* and fetchrow_*arrayref* explains why using a scalar returns 1 value for an array and all values into an arrayref. If you want the full row, you need to do @row = fetchrow_array(), not $row = fetchrow_array().
In Section
Seekers of Perl Wisdom
|
|