The rollback is probably because you have AUTOCOMMIT disabled and since you neither commit nor explicitly destroy the DBI object, the database cancels the changes.
That last error does seem like it's because of the scope of $dbh so try and declare the variable, or establish the connection outside of the loop.
In reply to Re: DBI: pass $dbh from a sub
by dsb
in thread DBI: pass $dbh from a sub
by poqui
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |