asp 数据库 select语句怎么写?
数据库要实现下面效果,怎么写select语句user2012-2-132012-2-1416:527:3227:047:05网页上显示上面的效果怎么写代码,请高手指教...
数据库
要实现下面效果,怎么写select语句
user 2012-2-13 2012-2-14
1 6:52 7:32
2 7:04 7:05
网页上显示上面的效果怎么写代码,请高手指教 展开
要实现下面效果,怎么写select语句
user 2012-2-13 2012-2-14
1 6:52 7:32
2 7:04 7:05
网页上显示上面的效果怎么写代码,请高手指教 展开
展开全部
<style type="text/css">
ul{float:left; width:100px; margin:0; padding:0px; border:1px solid #CCC;}
li{width:100px; height:20px; padding-top:10px; border-bottom:1px solid #CCC; border-right:1px solid #CCC;}
</style>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select format(f_time,'yyyy-MM-DD') as t from checktime group by format(f_time,'yyyy-MM-DD')",conn,1,1
if not rs.eof then
do while not rs.eof
response.Write "<ul>"
response.Write "<li>"&rs(0)&"</li>"
set rss=server.CreateObject("adodb.recordset")
rss.open "select * from checktime where format(f_time,'yyyy-MM-DD')='"&rs(0)&"'",conn,1,1
if not rss.eof then
do while not rss.eof
response.Write "<li>"&Hour(rss(1))&":"&Minute(rss(1))&"</li>"
rss.movenext
loop
end if
rss.close
set rss=nothing
response.Write "</ul>"
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
ul{float:left; width:100px; margin:0; padding:0px; border:1px solid #CCC;}
li{width:100px; height:20px; padding-top:10px; border-bottom:1px solid #CCC; border-right:1px solid #CCC;}
</style>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select format(f_time,'yyyy-MM-DD') as t from checktime group by format(f_time,'yyyy-MM-DD')",conn,1,1
if not rs.eof then
do while not rs.eof
response.Write "<ul>"
response.Write "<li>"&rs(0)&"</li>"
set rss=server.CreateObject("adodb.recordset")
rss.open "select * from checktime where format(f_time,'yyyy-MM-DD')='"&rs(0)&"'",conn,1,1
if not rss.eof then
do while not rss.eof
response.Write "<li>"&Hour(rss(1))&":"&Minute(rss(1))&"</li>"
rss.movenext
loop
end if
rss.close
set rss=nothing
response.Write "</ul>"
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询