asp+mssql统计问题
asp+mssql 该如何返回如下信息呢
比如一个表里面的数据
date info
2009-1-1 13:00:00 12345
2009-1-1 13:00:01 12345
2009-1-1 13:00:02 12345
2009-1-2 13:00:03 12345
2009-1-2 13:00:04 12345
2009-1-2 13:00:05 12345
2009-1-3 13:00:06 12345
如何返回
2009-1-1 3条数据
2009-1-2 3条数据
2009-1-3 1条数据呢
谢谢
listdate1=datevalue("2009-1-1")
listdate2=datevalue("2009-1-2")
listdate3=datevalue("2009-1-3")
select top 3 * from 表 where datediff('d',date,listdate1)=0
select top 3 * from 表 where datediff('d',date,listdate2)=0
select top 1 * from 表 where datediff('d',date,listdate3)=0
日期是并不知道具体是哪天的
那总得有条件啊 根据什么来显示 比如访客 自己选择日期 然后要显示几条 还是其他的 根据程序
哦 要统计啊
<%
dim listdate,rsnum
listdate=datevalue(request.QueryString("listdate"))
set rs=server.createobject("adodb.recordset")
rs..open"select * from 表 where datediff('d',date,listdate)=0 ",conn,1,1
rsnum=rs.recordcount
rs.close
set rs=nothing
%>
是要这样的 还是自动统计出数据库中 每个不同日期的数据个数
直接返回所有不同日期的数据个数就行了
set rs=server.createobj
相关问答:
我原本是学jsp的可找了一个ASP的公司!我要重新学习! 学习ASP! 希望大家推荐一本好书给我谢谢
<ASP3.0高级编程> 网上有电子版的
发现网上asp信息时最多的 比其他的都多好多
yun
找本有应用事例的A ......
我找了一个伪静态代码,如下:
index.asp
<!--#include file="config.asp"-->
<ol>
<%
Set rs=server.CreateObject("adodb.recordset") & ......
不是直接打开,而是读取内容,然后可以操作的数据,可以存储到数据库或者显示在页面上。
word文件在服务器端。
可以考虑用第三方组件
http://officewriter.softartisans.com/officewriter-372.aspx
有中文说 ......
http://www.zgjhjy.com/Test/PrimaryTest/Index.aspx
就是类似以上的在线测试系统,需要有一个后台的,语言是asp的,数据库是access的,还需要能在后台对信息进行添删改查的。谢谢各位了。。。
程序真的很多,不知 ......
<?php
if($_SERVER['HTTP_REFERER']!=''){
@header("Content-type:image/jpeg");
echo file_get_contents("xlight.jpg");
}
else{
@header("location:ht ......