I have a MS Sql stored procedure that inserts a record into a table and returns the Primary Key (as scope-identity) as output.
It works very well using classic asp but I need to convert it PHP 5 coding.
The examples I find use mssql_bind and so forth.
I need a good, understandable example that use sqlsrv_ commands. I understand about parameters etc but I do not know the exact syntax and structure of creating the code other than opening a connection etc.
I could just insert a record just as well but the requirement is that I must have primary key returned to me of the record that I just inserted, which is what scope_identity is about..and I am not sure how to that either..sigh
Could someone point me in the right direction on how to code for a stored procedure that returns the scope identity? Or inserting a record and returning its primary key?
It would be appreciated..