Only fetch the OID if it isn't known yet
authorJoey Schulze <joey@infodrom.org>
Wed, 20 Sep 2006 14:37:58 +0000 (14:37 +0000)
committerJoey Schulze <joey@infodrom.org>
Wed, 20 Sep 2006 14:37:58 +0000 (14:37 +0000)
src/Infodrom/logbook/update.wml

index 0acd396..a2c1afe 100644 (file)
@@ -41,8 +41,9 @@
   }
   // printf ("<pre>\n%s\n</pre>\n", $query);
   $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
-  $oid = pg_getlastoid ($sth);
-
+  if (!isset($oid)) {
+    $oid = pg_getlastoid ($sth);
+  }
 ?>
 
 <h3><? echo $o_teaser; ?></h3>