summaryrefslogtreecommitdiffstats
path: root/importxml.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-19 01:01:47 +0100
committermkanat%kerio.com <>2005-02-19 01:01:47 +0100
commit62eecf24480520e204ab0057f8f7845c13f37c13 (patch)
tree99252665b81610168701173d4b5ce272c378fda6 /importxml.pl
parentc720bf60573fdb92874056ffd07c3d6055df22af (diff)
downloadbugzilla-62eecf24480520e204ab0057f8f7845c13f37c13.tar.gz
bugzilla-62eecf24480520e204ab0057f8f7845c13f37c13.tar.xz
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-ximportxml.pl4
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'})) {