通過ODBC連接的SQL SERVER實例
更新時間:2006年10月09日 00:00:00 作者:
通過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);
?>
您可能感興趣的文章:
相關(guān)文章
PHP編程最快明白(第一講 軟件環(huán)境和準備工作)
PHP我使用的是ESSamp集成開發(fā)環(huán)境,版本PHP5以上,代碼經(jīng)windowsXP系統(tǒng)調(diào)試通過。2010-10-10PHP html_entity_decode()函數(shù)講解
今天小編就為大家分享一篇關(guān)于PHP html_entity_decode()函數(shù)講解,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧2019-02-02PHP strip_tags() 去字符串中的 HTML、XML 以及 PHP 標簽的函數(shù)
這篇文章主要介紹了PHP strip_tags() 函數(shù),該函數(shù)主要是剝?nèi)プ址械?HTML、XML 以及 PHP 的標簽的功能,需要的朋友可以參考下2016-05-05