通过ODBC连接的SQL SERVER实例一
<?
$connection = odbc_connect("mydata","userid","passwd");
$query = "select * from tab_1 where no>0" ;
$result = odbc_do($connection,$query) ;
print "<table border='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 "<td width='6%'><input style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; COLOR: #000000; FONT-SIZE: 9pt' size='7' type='text' name=text$i value=$temp>";
}
}
print "</table>";
odbc_close($connection);
?>
<?
$connection = odbc_connect("mydata","userid","passwd");
$query = "select * from tab_1 where no>0" ;
$result = odbc_do($connection,$query) ;
print "<table border='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 "<td width='6%'><input style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; COLOR: #000000; FONT-SIZE: 9pt' size='7' type='text' name=text$i value=$temp>";
}
}
print "</table>";
odbc_close($connection);
?>
版权声明:
本站所有资源均为站长或网友整理自互联网或站长购买自互联网,站长无法分辨资源版权出自何处,所以不承担任何版权以及其他问题带来的法律责任,如有侵权或者其他问题请联系站长删除!站长QQ754403226 谢谢。
- 上一篇: 模拟OICQ的实现思路和核心程序(三)
- 下一篇: 使用sockets:从新闻组中获取文章(二)