in reply to Problems with storable and Sqlite
my $book= $sth->fetchrow_array ;
I think your problem might be because you're calling fetchrow_array in scalar context, which can produce unexpected results. From the docs:
If called in a scalar context for a statement handle that has more than one column, it is undefined whether the driver will return the value of the first column or the last. So don't do that. Also, in a scalar context, an undef is returned if there are no more rows or if an error occurred. That undef can't be distinguished from an undef returned because the first field value was NULL. For these reasons you should exercise some caution if you use fetchrow_array in a scalar context.
To make it list context, do this:
my ( $book ) = $sth->fetchrow_array;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems with storable and Sqlite
by Errto (Vicar) on Nov 18, 2005 at 05:13 UTC |