in reply to Multiple DB Queries using DBI

I know it's not the situation that you have, but I've run into a problem where you can't be in the middle of a fetch and try to alter the database. Like-a-so:
$select = $dbh->prepare(q(select foo, bar from baz)); $delete = $dbh->prepare(q(delete from baz where foo=? and bar=?)); $select->execute(); $select->bind_columns(\($foo, $bar)); while($ref = $select->fetchrow_arrayref()) { $delete->execute($foo, $bar) if $foo == 3; #<----this won't work }
If you want to do something like that, you need a separate database handle for your "change" handle. So, I would need to make a second connection to the database to prepare the delete statement in this example.

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come