How to loop through multiple result sets from stored procedure in Laravel?
Im slightly going out of my mind trying to get 3 result sets from a stored procedure (SP) in SQL server 2012.
EXAMPLE
CREATE PROCEDURE db_abbTest
AS
BEGIN
SET NOCOUNT ON;
SELECT 1
SELECT 2
SELECT 3
RETURN 0
END
GO
The SP returns three results (3x select statements) however i cannot seem to get all of the results back from the query. Any Ideas? I have tried while(sqlsrv_fetch_object($r){//do something}) but no luck..
Hey good morning. If you take a look at the image, you will see that both results are different from each other yet necessary for the data that I need, and this is how the QUERY functions in the Store Procedure. I need this to run in PHP , NOT net core. Thank you so much.