求大神 asp中如何 统计当前页中数据数量
asp吧
全部回复
仅看楼主
level 1
mylove3344 楼主
统计当前表格中值的数量
样表:
样表如下:姓名 出勤情况
张 上班
张 上班
张 不上班
张 上班
张 不上班
张 上班
。。。。。。
总计:上班N天 不上班N天
求N ASP怎么写
2014年05月11日 07点05分 1
level 1
mylove3344 楼主
<table width="100%" height="40" border="0" align="center" cellpadding="0" cel
lsp
acing="1">
<tr>
<td height="25" align="center" bgcolor="#1759AF"></td>
<td height="25" align="center" bgcolor="#1759AF" class="con">统计</td>
<td height="25" colspan="4" align="center" bgcolor="#1759AF" class="con">正常出勤:
正常公休:半天:</td>
<td height="25" align="center" bgcolor="#1759AF"></td>
</tr>
<tr>
<td height="20" width="2%" bgcolor="#1759AF"> </td>
<td height="20" width="15%" align="center" bgcolor="#1759AF" class="title">姓名</td>
<td height="20" width="15%" align="center" bgcolor="#1759AF" class="title">出勤情况</td>
<td height="20" width="15%" align="center" bgcolor="#1759AF" class="title">出勤时间</td>
<td height="20" width="15%" align="center" bgcolor="#1759AF" class="title">所属部门</td>
<td height="20" width="36%" align="center" bgcolor="#1759AF" class="title">备注</td>
<td height="20" width="2%" bgcolor="#1759AF"> </td>
</tr>
<% dim id
dim page
page=csng(request.QueryString("page"))
set rs=server.CreateObject("ADODB.Recordset")
'response.Write sql
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.Write "<div align='center' class=""con"">暂时没有信息!</div>"
response.End()
end if
rs.pagesize=15
select case true
case page<= 0 page=1
case page>rs.pagecount page=rs.pagecount
end select
rs.AbsolutePage=page
for i=1 to rs.pagesize
%>
<tr>
<td align="center" height="20" bgcolor="#1759AF" class="con"><%=i%></td>
<td height="20" align="center" bgcolor="#1759AF" class="con"><%=rs("worker_name")%></td>
<td height="20" align="center" bgcolor="#1759AF" class="con"><%=rs("work_condition")%></td>
<td height="20" align="center" bgcolor="#1759AF" class="con"><%=rs("work_time")%></td>
<td height="20" align="center" bgcolor="#1759AF" class="con"><%=rs("worker_dp")%></td>
<td height="20" align="center" bgcolor="#1759AF" class="con"><%=rs("work_remark")%></td>
<td height="20" bgcolor="#1759AF"> </td>
</tr>
正常出勤:N 正常公休:N 半天:N
2014年05月11日 07点05分 2
level 1
mylove3344 楼主
坐等解决
2014年05月11日 08点05分 3
level 12
select count(*) as 上班 from 表名 where 用户=用户名 AND 上班=上班
select count(*) as 不上班 from 表名 where 用户=用户名 AND 上班=不上班
2014年05月11日 10点05分 4
能加您QQ吗? 实在搞不明白了
2014年05月11日 10点05分
275101203 不过先说好,我们是专职做网站的 只能给你免费做指导 不会动手给你改程序的!不要误解我们的善意哦,我们可不想充当别的卖家的免费售后![勉强]
2014年05月11日 10点05分
level 12
实际上 如果真正要做这样一个系统的话 可以用两张表
一张是每天的考勤 一张是其 一周 或一个月的考勤总计 一般都是以月为单位总计的吧
2014年05月11日 10点05分 5
level 11
循环 判断累加不就行了
2014年05月12日 08点05分 7
1