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 --- post_bug.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'post_bug.cgi') diff --git a/post_bug.cgi b/post_bug.cgi index 0f5abddb2..3e5b289a8 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -56,6 +56,8 @@ my $user = Bugzilla->login(LOGIN_REQUIRED); my $cgi = Bugzilla->cgi; +my $dbh = Bugzilla->dbh; + # do a match on the fields if applicable &Bugzilla::User::match_field ({ @@ -420,8 +422,7 @@ while (MoreSQLData()) { SendSQL($sql); # Get the bug ID back. -SendSQL("select LAST_INSERT_ID()"); -my $id = FetchOneColumn(); +my $id = $dbh->bz_last_key('bugs', 'bug_id'); # Add the group restrictions foreach my $grouptoadd (@groupstoadd) { -- cgit v1.2.3-24-g4f1b