Commit ddd9ebd5 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 140953 - Creating the first attachment status fails. Patch by jouni@heikniemi.net, 2xr=myk.

parent 947bd2d3
...@@ -239,7 +239,8 @@ sub insert ...@@ -239,7 +239,8 @@ sub insert
SendSQL("LOCK TABLES attachstatusdefs WRITE"); SendSQL("LOCK TABLES attachstatusdefs WRITE");
SendSQL("SELECT MAX(id) FROM attachstatusdefs"); SendSQL("SELECT MAX(id) FROM attachstatusdefs");
my $id = FetchSQLData() + 1; my $id = FetchSQLData() || 0;
$id++;
SendSQL("INSERT INTO attachstatusdefs (id, name, description, sortkey, product) SendSQL("INSERT INTO attachstatusdefs (id, name, description, sortkey, product)
VALUES ($id, $name, $desc, $::FORM{'sortkey'}, $product)"); VALUES ($id, $name, $desc, $::FORM{'sortkey'}, $product)");
SendSQL("UNLOCK TABLES"); SendSQL("UNLOCK TABLES");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment