in reply to SQLite select not returning all rows

A partial answer (with thanks to Arunbear and the CB) is to replace fetch_array with fetchall_arrayref and make appropriate changes in AddBuildManager:

my @managers = sort {$a->[0] cmp $b->[0]} @{$sth->fetchall_arrayre +f ()}; for my $index (0 .. @managers) { eval { my $id = sprintf "%s-%03d", $managerName, $index + 1; die if exists ($managers[$index][0]) and $managers[$index] +[0] eq $id;

However the current id is not being removed when the code exits, although I know the DELETE line is being executed without errors or warnings being generated.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: SQLite select not returning all rows
by GrandFather (Saint) on Mar 07, 2007 at 22:14 UTC

    and the last piece for this particular puzzle is a missing commit before the disconnect (thanks erix) in DESTROY:

    $dbh->do ("DELETE FROM managers WHERE id = '$self->{myId}'"); $dbh->commit (); $dbh->disconnect ();

    DWIM is Perl's answer to Gödel