cvs: pear /MDB2/MDB2/Driver mssql.php
| From: | Nathan Fredrickson | Date: | Thu, 15 Jun 2006 00:40:29 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver mssql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-40694@lists.php.net to get a copy of this message | ||
nrf Thu Jun 15 00:40:29 2006 UTC
Modified files:
/pear/MDB2/MDB2/Driver mssql.php
Log:
- use SCOPE_IDENTITY() instead of @@IDENTITY to retrieve last inserted value (bug #7291)
http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/mssql.php?r1=1.122&r2=1.123&diff_format=u
Index: pear/MDB2/MDB2/Driver/mssql.php
diff -u pear/MDB2/MDB2/Driver/mssql.php:1.122 pear/MDB2/MDB2/Driver/mssql.php:1.123
--- pear/MDB2/MDB2/Driver/mssql.php:1.122 Wed Jun 14 08:10:49 2006
+++ pear/MDB2/MDB2/Driver/mssql.php Thu Jun 15 00:40:29 2006
@@ -43,7 +43,7 @@
// | Author: Frank M. Kromann <frank@kromann.info> |
// +----------------------------------------------------------------------+
//
-// $Id: mssql.php,v 1.122 2006/06/14 08:10:49 lsmith Exp $
+// $Id: mssql.php,v 1.123 2006/06/15 00:40:29 nrf Exp $
//
// {{{ Class MDB2_Driver_mssql
/**
@@ -528,7 +528,7 @@
*/
function lastInsertID($table = null, $field = null)
{
- return $this->queryOne("SELECT @@IDENTITY FROM $table", 'integer');
+ return $this->queryOne("SELECT SCOPE_IDENTITY() FROM $table",
'integer');
}
// }}}
}