Fixed insert_id problem that randomly surfaced.
This commit is contained in:
parent
0e15fceb40
commit
a842d00804
@ -184,8 +184,12 @@ sub add_kwote {
|
|||||||
# execute
|
# execute
|
||||||
$sth->execute() or return undef;
|
$sth->execute() or return undef;
|
||||||
|
|
||||||
|
# get the id
|
||||||
|
my $insert_id = ($dbh->{'mysql_insertid'}) ?
|
||||||
|
$dbh->{'mysql_insertid'} : $sth->insert_id;
|
||||||
|
|
||||||
# return the id
|
# return the id
|
||||||
return $sth->{insertid};
|
return $insert_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
|
Loading…
Reference in New Issue
Block a user