in reply to getting the ids of records affected by an input statement
Doing error checking (and rolling back if necessary) is left as an exercise for the reader.$dbh -> begin_work; my $ids = $dbh -> selectall_arrayref("SELECT id FROM table WHERE col +1 != ? AND col2 = ?", undef, $val1, $val2); $dbh -> do("update table set col1= ? where col2 = ?", undef, $val1, +$val2); $dbh -> commit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: getting the ids of records affected by an input statement
by Anonymous Monk on Nov 22, 2010 at 23:38 UTC | |
by JavaFan (Canon) on Nov 22, 2010 at 23:48 UTC |