> I got the same error when the ; is replaced by a space.
> I know the ; is to be avoid for one statement (that work fine) but how
> to separate 2 clauses in the same statement ?

You don't.  That's what transactions are for.  Turn off AutoCommit for your
statement handle, run two seperate INSERT's, and then call an explicit
commit:

my $dbh = DBI->connect( blah );

my $first_insert = $dbh->prepare("INSERT x into y");
my $second_insert = $dbh->prepare("INSERT foo into bar");

{
        local $dbh->{AutoCommit} = 0;

        $first_insert->execute();
        $second_insert->execute();

        $dbh->commit;
}

HTH!

L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;


Reply via email to