mssql = microsoft sql server
i have noticed some strange situation working with mssql, look please at this simple example
simple example ==========================================
$myServer = "localhost";
$myUser="sa";
$myPass="sa";
$myDB="DATABASE";
$db1 = @mssql_connect('localhost',"sa","sa");
mssql_select_db($myDB,$db1);
$sp = mssql_init("STORED_PROCEDURE",$db1);
$rs1 = mssql_execute($sp);
$rs2=mssql_query("SELECT * FROM TABLE");
while($frs2=mssql_fetch_array($rs2))
{
echo "<br>".$frs2["ID"];
}
while ($frs = mssql_fetch_array($rs1))
{
echo "<br>".$frs["A_TYPE"];
}
now problem description........
this simple example works good when STORED_PROCEDURE ( see in $rs1 execute statement ) has only one recordset returned in query
but when STORED_PROCEDURE has more than one recordset returned in one query i get the error like
mssql_query() [function.mssql-query]: Query failed in....
maybe someone have this situation in work, maybe someone can hep me,
big thanks for your help