I encountered a very strange problem when I was working on a project today. When I used PHP's sqlsrv to call the stored procedure of sql server, no error was reported, and no result set was returned.
My var_dump comes out as null
But when executing the statement in sql server 2008, there is data
So I searched for information on the Internet for a long time and found a person who does java. He said this
So I tried it and changed the sql statement to
I didn’t expect it to be possible
I thought it was solved when I could get the result set
As a result, I changed a machine, put the program in and ran it, but it didn’t work again. It didn’t work whether I added SET NOCOUNT ON in front or not. If I changed it to another select SQL statement, it would be fine. But the stored procedure wouldn’t work. I was at a loss. , see if anyone can give me some advice