如何在MSSQL和php中执行存储过程后显示输出


how to show output after executing stored procedure in mssql and php

$server = 'x.x.x.x'SQLEXPRESS';
// Connect to MSSQL
$link = mssql_connect($server, 'username', 'password');
if (!$link) {
    die('Something went wrong while connecting to MSSQL');
}
else
{
    echo "Connected!";``
}
$selected = mssql_select_db('dbname', $link)
    or die("Couldn't open database ")
$proc = mssql_init('sp_Index', $link);
$proc_result = mssql_execute($proc);

如何显示$proc_result的结果。我的存储过程是sp_index。我不知道结构sp_index

mssql_fetch_array()呢?

while ($row = mssql_fetch_array($proc_result)
{
    // Do your thing with $proc['column_name']
}