diff options
author | 2005-02-19 00:01:47 +0000 | |
---|---|---|
committer | 2005-02-19 00:01:47 +0000 | |
commit | 62eecf24480520e204ab0057f8f7845c13f37c13 (patch) | |
tree | 99252665b81610168701173d4b5ce272c378fda6 /importxml.pl | |
parent | Bug 282570: Missing errors for DB compatibility layer (diff) | |
download | bugzilla-62eecf24480520e204ab0057f8f7845c13f37c13.tar.gz bugzilla-62eecf24480520e204ab0057f8f7845c13f37c13.tar.bz2 bugzilla-62eecf24480520e204ab0057f8f7845c13f37c13.zip |
Bug 280494: Replace "SELECT LAST_INSERT_ID()" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
Diffstat (limited to 'importxml.pl')
-rwxr-xr-x | importxml.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/importxml.pl b/importxml.pl index 21d962d41..3b3b24a17 100755 --- a/importxml.pl +++ b/importxml.pl @@ -162,6 +162,7 @@ $xml =~ s/^.+(<\?xml version.+)$/$1/s; my $parser = new XML::Parser(Style => 'Tree'); my $tree = $parser->parse($xml); +my $dbh = Bugzilla->dbh; my $maintainer; if (defined $tree->[1][0]->{'maintainer'}) { @@ -609,8 +610,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) { . join (",\n", @values) . "\n)\n"; SendSQL($query); - SendSQL("select LAST_INSERT_ID()"); - my $id = FetchOneColumn(); + my $id = $dbh->bz_last_key('bugs', 'bug_id'); if (defined $bug_fields{'cc'}) { foreach my $person (split(/[ ,]/, $bug_fields{'cc'})) { |