From 62eecf24480520e204ab0057f8f7845c13f37c13 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sat, 19 Feb 2005 00:01:47 +0000 Subject: Bug 280494: Replace "SELECT LAST_INSERT_ID()" with Bugzilla::DB function call Patch By Tomas Kopal r=mkanat, a=justdave --- importxml.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'importxml.pl') 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'})) { -- cgit v1.2.3-24-g4f1b