Hi,
I have 2 insert statements which insert data into two different tables.
These 2 inserts need to be run atomically, How can I do this?
If I commit at the end of the two inserts, would that work?
$sth = $dbh->prepare("
insert into main(main_id, domain_id, font_size,
max_width_chars, max_width_pixels)
values(main_id_seq.nextval, $domain_id,
12,0,0)"
) || die $dbh->errstr;
$sth->execute || die $dbh->errstr;
$sth = $dbh->prepare("
insert into language(language_id,main_id, language,
string,translation_req)
values(language_id_seq.nextval, main_id_seq.currval,
'eng', $str, 1)"
) || die $dbh->errstr;
$sth->execute || die $dbh->errstr;
- Re: executing atomic transactions in DBI traja
- Re: executing atomic transactions in DBI Mark Vandenbroeck
- Re: executing atomic transactions in DBI Peter J. Schoenster
- RE: executing atomic transactions in DBI Sterin, Ilya
- Re: executing atomic transactions in DBI Stephen Clouse
- RE: executing atomic transactions in ... Sterin, Ilya
- RE: executing atomic transaction... Peter J. Schoenster
- RE: executing atomic transac... Bodo Eing
- Re: executing atomic tra... Stephen Clouse
- Re: executing atomic tra... Michael A Mayo
- Re: executing atomic tra... Bodo Eing
