in reply to Re: Re: Can't retrieve all records
in thread Can't retrieve all records

fetchall_hashref is a fairly recent addition to DBI. Consider having your version of DBI upgraded (if that's an option).

The other way you can do it ... and there are pretier ways then this I'm sure, but it will work:

{ my ($dbh, $track_ref) = @_; $dbh = WebDB::connect (); my $sth = $dbh->prepare ("SELECT * FROM Shipments WHERE customer_id = +?"); $sth->execute($customer_id); while($track_ref = $sth->fetchrow_hashref) { .. do stuff with each row returned here } }