zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

通过ODBC连接的SQLSERVER实例

SQLServer实例连接 通过 ODBC
2023-06-13 09:13:43 时间
通过ODBC连接的SQLSERVER实例一

<?
$connection=odbc_connect("mydata","userid","passwd");
$query="select*fromtab_1where  no>0";
$result=odbc_do($connection,$query);
print"<tableborder="1"width="100%"id="tab1"cellPadding="1"cellSpacing="0"  align="top"bordercolorlight="#008000"bordercolordark="#008000">";
while(odbc_fetch_into($result,&$fields))  
{
print"<tr>\n";
for($i=21;$i<=31;$i++)  {
print"<tdwidth="6%"><inputstyle="BACKGROUND-COLOR:#ffffff;BORDER-BOTTOM:#0000001pxsolid;BORDER-LEFT:#ffffff1pxsolid;BORDER-RIGHT:#ffffff1pxsolid;BORDER-TOP:#ffffff  1pxsolid;BORDER-BOTTOM:#ffffff1pxsolid;COLOR:#000000;FONT-SIZE:9pt"  size="7"type="text"  name=text$ivalue=$temp>";
}
}
print"</table>";
odbc_close($connection);
?>