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:
gerv%gerv.net 2002-04-29 19:29:52 +00:00
parent cb75dbfa12
commit 8a60366c55

View File

@ -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");