in reply to Re: fetchrow_array loop in perl 5.10
in thread fetchrow_array loop in perl 5.10

Depending on (the version of) your database driver, it might be that your database driver does not like more than one statement handle being active at the same time.

Yep, that's what happened to me. I had to declare $dbh2 to make my stuff work. $dbh cannot handle both statements. I use DBD::Pg for Postgresql.

Perl 5.8.8 on Redhat Linux RHEL 5.5.56 (64-bit)

Replies are listed 'Best First'.
Re^3: fetchrow_array loop in perl 5.10
by erix (Prior) on Sep 18, 2014 at 19:54 UTC

    See perhaps, DBI, fork, and clone.

    I can't tell if applicable to those problems (yours and that of the OP), but it's interesting anyway :)