在线等!ASP中数据库调用的问题!!!
总管理员查看学员总学时的代码:setrs=Server.CreateObject("ADODB.RecordSet")ifnottsort=""thensql="sele...
总管理员查看学员总学时的代码:
set rs=Server.CreateObject("ADODB.RecordSet")
if not tsort="" then
sql="select * from info order by id "
else
sql="select * from info order by id "
end if
rs.open sql,conn,1,1
rs.PageSize=10
if not rs.eof then
rs.AbsolutePage=page
for k=1 to rs.PageSize
%>
<td height="24" width="40" align="center">
<%response.Write(rs("id"))%>
</td>
<td height="24" width="60" align="center">
<%=rs("username")%> </td>
<td height="24" width="40" align="center">总学时</td>
</table>
个人页面显示自己总学时的代码:
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" &_
Server.MapPath("qwang2006/#superking401954.asp"))
set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM thour where username='"&session("username")&"' ORDER BY 编号 DESC"
rs.Open sql, conn, 1
%>
response.write(thour)
%>
请教大师,如何把每个学员的总学时放到总管理员的界面中?谢谢了。(总学时是单独的一个数据表,表中有username thour 两个字段) 展开
set rs=Server.CreateObject("ADODB.RecordSet")
if not tsort="" then
sql="select * from info order by id "
else
sql="select * from info order by id "
end if
rs.open sql,conn,1,1
rs.PageSize=10
if not rs.eof then
rs.AbsolutePage=page
for k=1 to rs.PageSize
%>
<td height="24" width="40" align="center">
<%response.Write(rs("id"))%>
</td>
<td height="24" width="60" align="center">
<%=rs("username")%> </td>
<td height="24" width="40" align="center">总学时</td>
</table>
个人页面显示自己总学时的代码:
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" &_
Server.MapPath("qwang2006/#superking401954.asp"))
set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM thour where username='"&session("username")&"' ORDER BY 编号 DESC"
rs.Open sql, conn, 1
%>
response.write(thour)
%>
请教大师,如何把每个学员的总学时放到总管理员的界面中?谢谢了。(总学时是单独的一个数据表,表中有username thour 两个字段) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询