QueryDawg Posted January 29, 2014 Share Posted January 29, 2014 Hello, I'm have several Stored Procedures in an MSSQL database that return multiple recordsets but I can't seem to find out how to access the second (and third) result sets. So my stack looks something like Mac OSX > PHP 5.4.24 > unixODBC/freeTDS > (remote) Microsoft SQL Server 2008 I'm doing something like this which works fine for SQL Statements or SP's that return a single recordset: $conn = odbc_connect('my_data_source','my_login','my_password'); $rs = odbc_exec($conn,"exec MY_STORED_PROCEDURE_NAME"); // <- this returns 3 recordsets manipulating $rs works fine for the first recordset returned. I assume $rs is "hidding" results 2 and 3? Maybe? Thanks in advance, Link to comment https://forums.phpfreaks.com/topic/285757-how-to-get-to-additional-recordsets-when-a-stored-procedure-returns-more-than-one/ Share on other sites More sharing options...
kicken Posted January 29, 2014 Share Posted January 29, 2014 odbc_next_result Link to comment https://forums.phpfreaks.com/topic/285757-how-to-get-to-additional-recordsets-when-a-stored-procedure-returns-more-than-one/#findComment-1466898 Share on other sites More sharing options...
QueryDawg Posted January 29, 2014 Author Share Posted January 29, 2014 Genius!!! I wish I had seen that when looking at the docs. Thanks for that Link to comment https://forums.phpfreaks.com/topic/285757-how-to-get-to-additional-recordsets-when-a-stored-procedure-returns-more-than-one/#findComment-1466989 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.