in reply to Multiple DB Queries using DBI
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.$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 }
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
|
|---|