On Tue, Feb 14, 2006 at 06:16:30PM -0000, Martin J. Evans wrote:
> Regarding my posting with a problem using DBI 1.50 and DBD:mysql 3.0002_4
> (reprinted below) I wonder if someone who knows DBI and DBD::mysql better
> than I can point me in the right direction. I've discovered if I make a small
> change to DBI it works (see commented out lines):
>
> sub fetchall_hashref {
> my @row = (undef) x $num_of_fields;
> # replace:
> # $sth->bind_columns(\(@row));
> # while ($sth->fetch) {
> # with
> while (@row = $sth->fetchrow_array) {
> my $ref = $rows;
> $ref = $ref->{$row[$_]} ||= {} for @key_indexes;
> @[EMAIL PROTECTED] = @row;
> }
> return $rows;
> }
> There was a slight error in this posting - I was doing:
>
> selectall_hashred(sql, ['meeting_id', 'race_id'])
Try producing a very small self-contained test case (one that creates and
populates the tables it uses with a small amount of data) so others can
easily investigate.
Tim.