$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
答案 0 :(得分:0)
while ($row = mssql_fetch_array($proc_result)
{
// Do your thing with $proc['column_name']
}