#27920 [Opn->Fbk]: Mutliple execution of SQL-INSERT by mssql_query

From: Date: Thu, 08 Apr 2004 15:19:31 +0000
Subject: #27920 [Opn->Fbk]: Mutliple execution of SQL-INSERT by mssql_query
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57788@lists.php.net to get a copy of this message
ID: 27920 Updated by: sniper@php.net Reported By: klaus dot kuehne at gga-hannover dot de -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: Win 2000 Server PHP Version: 4.3.5 New Comment: Huh? How can this be PHP bug? Previous Comments: ------------------------------------------------------------------------ [2004-04-08 09:16:26] klaus dot kuehne at gga-hannover dot de Description: ------------ Depending of database and/or network charge, a single INSERT may be executed more than one time by mssql_query(), even if the first INSERT was executed successfully. The return code of mssql_query will be set to the last executed INSERT. In my case, a unique index prevented the subsequent INSERT's. This caused a lot of confusion, because the first INSERT was completed successful and mssql_query("INSERT INTO ...", $con) delivered "false" nevertheless. Problably, a longer delay time will be misinterpreted as a database lock, and mssql_query tries to encounter this by repetitions of the same INSERT. Couldn't find any workaround for this. I recognized this bug in PHP versions 4.3.2 - 4.3.5. Expected result: ---------------- A succesful INSERT may not be repeated. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27920&edit=1

« previous php.bugs (#57788) next »