diff options
author | mkanat%kerio.com <> | 2005-02-19 00:01:47 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-19 00:01:47 +0000 |
commit | 62eecf24480520e204ab0057f8f7845c13f37c13 (patch) | |
tree | 99252665b81610168701173d4b5ce272c378fda6 /editproducts.cgi | |
parent | c720bf60573fdb92874056ffd07c3d6055df22af (diff) | |
download | bugs-62eecf24480520e204ab0057f8f7845c13f37c13.tar bugs-62eecf24480520e204ab0057f8f7845c13f37c13.tar.gz bugs-62eecf24480520e204ab0057f8f7845c13f37c13.tar.bz2 bugs-62eecf24480520e204ab0057f8f7845c13f37c13.tar.xz bugs-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 'editproducts.cgi')
-rwxr-xr-x | editproducts.cgi | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editproducts.cgi b/editproducts.cgi index f066f7029..11658c29a 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -506,8 +506,7 @@ if ($action eq 'new') { SqlQuote($votestoconfirm) . "," . SqlQuote($defaultmilestone) . "," . SqlQuote($classification_id) . ")"); - SendSQL("SELECT LAST_INSERT_ID()"); - my $product_id = FetchOneColumn(); + my $product_id = $dbh->bz_last_key('products', 'id'); SendSQL("INSERT INTO versions ( " . "value, product_id" . @@ -531,8 +530,7 @@ if ($action eq 'new') { "VALUES (" . SqlQuote($productgroup) . ", " . SqlQuote("Access to bugs in the $product product") . ", 1, NOW())"); - SendSQL("SELECT last_insert_id()"); - my $gid = FetchOneColumn(); + my $gid = $dbh->bz_last_key('groups', 'id'); my $admin = GroupNameToId('admin'); # If we created a new group, give the "admin" group priviledges # initially. |