I'm using MS SQL not mysql.
I'm sending multiple SQL statements to mssql_query and I then need to know how many tables are in the returned result.
So If I send the query:
$sql = "select from table1
select from table2
select * from table3";
$result = mssql_query($sql, $link)
How can I then get the total number of tables in the result? Obviously in my example I know there are 3, but how can I tell this in code? I tried this:
$tcount = 0;
do{
$tcount++;
} while (mssql_next_result($result));
the problem now is I'm at the end of $result. So when I go to use $result I don't know how to get back to table1, I'm stuck on table3.
Thank you for your help.
tk