WEB开发网
开发学院WEB开发PHP 通过ODBC连接的SQL SERVER实例 阅读

通过ODBC连接的SQL SERVER实例

 2001-05-21 11:44:09 来源:WEB开发网   
核心提示:通过ODBC连接的SQL SERVER实例一 <? $connection = odbc_connect("mydata","userid","passwd"); $query = "select * from tab_1 whereno>
通过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);
?> 

Tags:通过 ODBC 连接

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接