asp 调用字段变量
我现在有张表,如图,想把赛事介绍内容显示到一张网页上,请高手给出完整代码,最好带说明,高分感谢!在线等,急!QQ895538081...
我现在有张表,如图,想把赛事介绍内容显示到一张网页上,请高手给出完整代码,最好带说明,高分感谢!在线等,急!QQ895538081
展开
1个回答
展开全部
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>赛事查询</title>
</head>
<%
Set conn=server.CreateObject("adodb.connection")
connstr="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("db.mdb")
conn.open connstr
%>
<body>
<table width="600" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr align="center" bgcolor="#FFFFFF">
<td>赛事介绍</td>
</tr>
</table>
<%
sql = "select * from Mu where id=2"
Set Rs = server.createobject("adodb.recordset")
Rs.open sql,conn,1,1
%>
<table width="600" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr align="center" bgcolor="#FFFFFF">
<td><%=rs("info")%></td>
</tr>
</table>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>赛事查询</title>
</head>
<%
Set conn=server.CreateObject("adodb.connection")
connstr="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("db.mdb")
conn.open connstr
%>
<body>
<table width="600" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr align="center" bgcolor="#FFFFFF">
<td>赛事介绍</td>
</tr>
</table>
<%
sql = "select * from Mu where id=2"
Set Rs = server.createobject("adodb.recordset")
Rs.open sql,conn,1,1
%>
<table width="600" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr align="center" bgcolor="#FFFFFF">
<td><%=rs("info")%></td>
</tr>
</table>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询