From:             klaus dot kuehne at gga-hannover dot de
Operating system: Win 2000 Server
PHP version:      4.3.5
PHP Bug Type:     MSSQL related
Bug description:  Mutliple execution of SQL-INSERT by mssql_query 

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 bug report at http://bugs.php.net/?id=27920&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27920&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27920&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27920&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27920&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27920&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27920&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27920&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27920&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27920&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27920&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27920&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27920&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27920&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27920&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27920&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27920&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27920&r=float

Reply via email to