Revision 6b23fb21
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/FU.pm | ||
---|---|---|
81 | 81 |
|
82 | 82 |
SL::DB->client->with_transaction(sub { |
83 | 83 |
do_query($form, SL::DB->client->dbh, qq|UPDATE follow_ups SET done = TRUE WHERE id = ?|, conv_i($params{id})); |
84 |
}); |
|
84 |
1; |
|
85 |
}) or do { die SL::DB->client->error }; |
|
85 | 86 |
|
86 | 87 |
$main::lxdebug->leave_sub(); |
87 | 88 |
} |
... | ... | |
105 | 106 |
do_query($form, $dbh, qq|DELETE FROM follow_up_links WHERE follow_up_id = ?|, $id); |
106 | 107 |
do_query($form, $dbh, qq|DELETE FROM follow_ups WHERE id = ?|, $id); |
107 | 108 |
do_query($form, $dbh, qq|DELETE FROM notes WHERE (trans_id = ?) AND (trans_module = 'fu')|, $id); |
108 |
}); |
|
109 |
1; |
|
110 |
}) or do { die SL::DB->client->error }; |
|
109 | 111 |
|
110 | 112 |
$main::lxdebug->leave_sub(); |
111 | 113 |
} |
... | ... | |
444 | 446 |
} |
445 | 447 |
|
446 | 448 |
$sth->finish(); |
447 |
}); |
|
449 |
1; |
|
450 |
}) or do { die SL::DB->client->error }; |
|
448 | 451 |
|
449 | 452 |
$main::lxdebug->leave_sub(); |
450 | 453 |
} |
Auch abrufbar als: Unified diff
single-dbh: Fehler in Transaktionen immer weiterwerfen