Hello
I'm using PHP4 and mssql_* functions (MSSQL 2000).
Query like this:
insert into xxx (yyy) values ('zzz') select @@identity;
is processed ok, but returns true (boolean), not MS SQL resource id.
Is that guaranted that when I split that into 2 queries (insert and select) I'll get proper identity? I mean something like that:
- user 1 inserts row
- user 2 inserts row
- user 1 selects @@identity
does the first user get identity of the row he inserted or identity of the row inserted by user 2?
greetings
marcin
I'm using PHP4 and mssql_* functions (MSSQL 2000).
Query like this:
insert into xxx (yyy) values ('zzz') select @@identity;
is processed ok, but returns true (boolean), not MS SQL resource id.
Is that guaranted that when I split that into 2 queries (insert and select) I'll get proper identity? I mean something like that:
- user 1 inserts row
- user 2 inserts row
- user 1 selects @@identity
does the first user get identity of the row he inserted or identity of the row inserted by user 2?
greetings
marcin