Help for this page

Select Code to Download


  1. or download this
    $dbh->do('insert mumble');
    my $id = $dbh->{'mysql_insertid'};
    
  2. or download this
    $dbh->do("set nocount on"); # so it works on SQL Server 6.5 too
    my $sth = $dbh->prepare(
        "insert mumble
    ...
    my $id = $sth->fetchrow_arrayref->[0];
    $sth->finish;
    $dbh->do("set nocount off");