diff options
Diffstat (limited to 'lib/public/IDBConnection.php')
-rw-r--r-- | lib/public/IDBConnection.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php index 4e450eae736..204d7bc99ed 100644 --- a/lib/public/IDBConnection.php +++ b/lib/public/IDBConnection.php @@ -104,7 +104,9 @@ interface IDBConnection { public function lastInsertId($table = null); /** - * Insert a row if the matching row does not exists. + * Insert a row if the matching row does not exists. To accomplish proper race condition avoidance + * it is needed that there is also a unique constraint on the values. Then this method will + * catch the exception and return 0. * * @param string $table The table name (will replace *PREFIX* with the actual prefix) * @param array $input data that should be inserted into the table (column name => value) |