我正在尝试使用 DNS - Less Connection 从 MS SQL 添加列名;我已经使用 dns-less 代码成功连接,但我还需要打印列名。
echo "<table>";
while (!$rs->EOF) //carry on looping through while there are records
{
echo "<tr>";
for ($i=0; $i < $num_columns; $i++) {
echo "<td>" . $fld[$i]->value . "</td>";
}
echo "</tr>";
$rs->MoveNext(); //move on to the next record
}
echo "</table>"; //close the connection and recordset objects freeing up resources
我知道如何修改表格,但如何添加表格名称?