- or download this
$dbh->do("INSERT INTO tbl VALUES(NULL,'foo','bar')");
- or download this
my $ref = $dbh->selectcol_arrayref(
"SELECT MAX(LineID) FROM tbl"
);
my $LineID = $$ref_booking[0];
- or download this
my $ref = $dbh->selectcol_arrayref(
"SELECT LAST_INSERT_ID() FROM tbl
");
- or download this
$dbh->{AutoCommit} = 0; # enable transactions, if possible
$dbh->{RaiseError} = 1;
...
$dbh->rollback; # undo the incomplete changes
# add other application on-error-clean-up code here
}