Home » Database » MDB2_Driver_mssql » Bug #7291
Use of @@IDENTITY
Details
| Submitted | 2006-04-04 16:23 UTC |
|---|---|
| From | james dot sapara+pear at gmail dot com |
| Assigned | nrf |
| Status | Closed |
| Package | MDB2_Driver_mssql |
| PHP Version | 4.4.2 |
| OS | Windows/Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-04-04 16:23 UTC] james dot sapara+pear at gmail dot com
Description:
------------
It is possible that the use of @@IDENTITY will not return the expected value when there is a trigger present. The use of SCOPE_IDENTITY() is preferred in this case.
file: mssql.sql
line: 540
replace line:
$result =& $this->query("SELECT @@IDENTITY FROM $seqname");
with:
$result =& $this->query("SELECT SCOPE_IDENTITY() FROM $seqname");
[2006-06-15 01:00 UTC] nrf at php dot net
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.