in reply to Re: DBD::SQLite select fails
in thread DBD::SQLite select fails

Yes, but also @rows=$sth->fetchrows_array also returns no records. Hence my puzzlement.
Perl 5.8.8 on Redhat Linux RHEL 5.5.56 (64-bit)

Replies are listed 'Best First'.
Re^3: DBD::SQLite select fails
by poj (Abbot) on Aug 12, 2014 at 11:54 UTC
    Method fetchrows_array does not exist. What where you expecting @rows to contain ?
    Update: Maybe you meant fetchrow_array like this
    #!perl use strict; use DBD::SQLite; use Data::Dump 'pp'; my $dbfile = 'test.sqlite'; my $dbh = DBI->connect('dbi:SQLite:'.$dbfile , undef , undef , {RaiseError =>1, AutoCommit =>1}) or die $DBI::errstr; $dbh->do('CREATE TABLE IF NOT EXISTS data ( skey TEXT PRIMARY KEY, svalue TEXT )'); $dbh->do("INSERT INTO data (skey, svalue) VALUES ('Stuff','Ge 1:1-more &stuff&here ')"); my $sql = "SELECT svalue FROM data WHERE skey='Stuff'"; my $sth = $dbh->prepare($sql); $sth->execute(); my @row = $sth->fetchrow_array; pp @row;
    poj