diff --git a/kwotes-lib.pl b/kwotes-lib.pl index 9499fb8..819b200 100755 --- a/kwotes-lib.pl +++ b/kwotes-lib.pl @@ -184,8 +184,12 @@ sub add_kwote { # execute $sth->execute() or return undef; + # get the id + my $insert_id = ($dbh->{'mysql_insertid'}) ? + $dbh->{'mysql_insertid'} : $sth->insert_id; + # return the id - return $sth->{insertid}; + return $insert_id; } ##