Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #7291 Use of @@IDENTITY
Submitted: 2006-04-04 16:23 UTC
From: james dot sapara+pear at gmail dot com Assigned: nrf
Status: Closed Package: MDB2_Driver_mssql (version 1.7.6)
PHP Version: 4.4.2 OS: Windows/Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 19 + 40 = ?

 
 [2006-04-04 16:23 UTC] james dot sapara+pear at gmail dot com (james)
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");

Comments

 [2006-04-05 07:05 UTC] lsmith (Lukas Smith)
I will relabel this as an MDB2_Driver_mssql bug for now, as here is where most development is going on. We should first analyze the actual impact and then decide a fix that we will then backport.
 [2006-06-15 01:00 UTC] nrf at php dot net (Nathan Fredrickson)
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.