ASP降序问题

2013 年 12 月 31 日5230

ASP降序问题

<%
Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16)"
Rs.Open Sql, conn, 1,1
Do Until Rs.Eof
%>

怎样让他读取到数据库的降序ID呢
也就是让所有文章标题最新的始终在最前面


试试看
Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16) order by id desc"


读出结果按 d_classid 字段降序排列...

<%
Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16) order by d_classid desc"
Rs.Open Sql, conn, 1,1
Do Until Rs.Eof
%>


Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16) order by id desc"

dao!

<%
Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16) order by d_classid desc "
Rs.Open Sql, conn, 1,1
Do Until Rs.Eof
%>

上面的方法都可以,试试吧

Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16) order by id desc"

相关问答:

asp初学问题。response找不到

<%@language="vbscript"%>
<%option explicit%>
<html>
<head> <title>xxx </title> </head>
<script language=vbs>
'注意变量 ......

ASP简单问题

conn.asp

<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.MapPath("Connt ......

我想做一个asp网站,但是不知道做什么!

最近我通过学习,感觉自己学的还可以了,想做一网站,但是一直都找不到题材,不知道做什么,希望各位给我点意见,如果有需求文档就更好了!希望大家给我点意见,谢谢!
先做个企业网站吧,我感觉一个人做网站不适宜 ......

asp页面调试问题

建了一个站点,里面有 login.aspx. events.aspx 等等 其他的页面。

但是我调试 其他页面的时候,蹦出来的总是 login.aspx 页面。

刚学asp 请指教
你设置起始页了吧。。

恩怎么取消呢?

要 ......

asp能执行动态T-SQL吗?

直接在sql语句中写:
sql= " declare @1 nvarchar(max),@2 nvarchar(max)...... "
然后
Rs.open sql,CONN,3,2
Response.Write Rs.recordcount

但是没有打开,报错
ADODB.Records ......

0 0