Bug 140953 - Creating the first attachment status fails. Patch by jouni@heikniemi.net, 2xr=myk.
git-svn-id: svn://10.0.0.236/trunk@120206 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
cb75dbfa12
commit
8a60366c55
@ -239,7 +239,8 @@ sub insert
|
||||
|
||||
SendSQL("LOCK TABLES attachstatusdefs WRITE");
|
||||
SendSQL("SELECT MAX(id) FROM attachstatusdefs");
|
||||
my $id = FetchSQLData() + 1;
|
||||
my $id = FetchSQLData() || 0;
|
||||
$id++;
|
||||
SendSQL("INSERT INTO attachstatusdefs (id, name, description, sortkey, product)
|
||||
VALUES ($id, $name, $desc, $::FORM{'sortkey'}, $product)");
|
||||
SendSQL("UNLOCK TABLES");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user