通过ODBC连接的SQL SERVER实例
2018-09-07 12:47
  通过ODBC连接的SQL SERVER实例一 
<? 
$connection = odbc_connect("mydata","userid","passwd"); 
$query = "select * from tab_1 whereno>0" ; 
$result = odbc_do($connection,$query) ; 
print "<table border=1 width=100% id=tab1 cellPadding=1 cellSpacing=0align=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: #ffffff1px solid; BORDER-BOTTOM: #ffffff 1px solid; COLOR: #000000; FONT-SIZE: 9ptsize=7 type=textname=text$i value=$temp>"; 
} 
} 
print "</table>"; 
odbc_close($connection); 
?>
上一篇:PHP多进程编程实例详解
文章标题:通过ODBC连接的SQL SERVER实例
文章链接:http://soscw.com/index.php/essay/12181.html