in reply to Re: DBI::fetchall_arrayref() error
in thread DBI::fetchall_arrayref() error
No.
I tried this piece of code, it fails with the same error:
use DBI; use Data::Dumper; use strict; my $dbh = DBI->connect('dbi:ODBC:TestingDB',"","",{RaiseError => 1, Au +toCommit=>1}) || die "failed"; my $sth = $dbh->prepare("select cof_name, price from coffees") or die; $sth->execute or die; while (my $rows = $sth->fetchall_arrayref([0,1]), 3) { last if ($#$rows < 0); } $dbh->disconnect();
And this does not explain why it works, if you change [0] to undef. Even if what you said is right, should not fetchall_arrayref gives user the same interface, with undef and [0].
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: DBI::fetchall_arrayref() error
by Roger (Parson) on Jan 12, 2004 at 02:34 UTC | |
by pg (Canon) on Jan 12, 2004 at 03:02 UTC |