标签:select contact body result name col sql odbc 错误
<html> <body> <?php $conn=odbc_connect(‘northwind‘,‘‘,‘‘); if (!$conn) { exit("连接失败: " . $conn); } $sql="SELECT * FROM customers"; $rs=odbc_exec($conn,$sql); if (!$rs) { exit("SQL 语句错误"); } echo "<table><tr>"; echo "<th>Companyname</th>"; echo "<th>Contactname</th></tr>"; while (odbc_fetch_row($rs)) { $compname=odbc_result($rs,"CompanyName"); $conname=odbc_result($rs,"ContactName"); echo "<tr><td>$compname</td>"; echo "<td>$conname</td></tr>"; } odbc_close($conn); echo "</table>"; ?> </body> </html>
标签:select contact body result name col sql odbc 错误
原文地址:https://www.cnblogs.com/tszr/p/10955800.html