in reply to Re^2: Retrieving multiple records from database
in thread Retrieving multiple records from database

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().

  • Comment on Re^3: Retrieving multiple records from database