Re: Retrieve value of newly inserted row.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brad Fuller wrote:
>From looking on the web (MSDN) I found the @@identity and the explanation
of
what it is, but MS's "example" is horrible and does not show a good
context
for using this function.  Could you elaborate more on its use?

$q = mssql_query("INSERT INTO TableName(...) VALUES(...) SELECT
LAST_INSERT_ID=@@IDENTITY");
$r = mssql_fetch_assoc($q);


HTH,

Brad


Might look at this

http://us3.php.net/manual/en/function.mssql-query.php#46026

--
Enjoy,

Jim Lucas

Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree.

- Rush

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux