ASP排序的问题

来源:百度知道 编辑:UC知道 时间:2024/05/22 08:14:39
我想对图片进行自由排序,数字越大越靠前,请高手帮忙指点!急。以下是我的代码!

<!--#include file="mdb/conn.asp" -->
<!--#include file="config.asp" -->
<!--#include file="check.asp" -->
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="INDEX.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.xzy {border: <%=xcolor%> solid; border-width: 0px 1px 1px}
-->
</style>
</head>

<body bgcolor="<%=bgcolor%>" text="#000000">
<!--#include file="top.asp" -->
</td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="5" align="center

sql = "SELECT * FROM zhuanti where id="&typeid

&" order by type_order DESC"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,1,1
if rs.eof and rs.bof then
Response.Redirect"info.asp?info=没有该主题"
else

order 前面要加空格.

改成

sql = "SELECT * FROM zhuanti where id="&typeid

&"order by type_order DESC"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,1,1
if rs.eof and rs.bof then
Response.Redirect"info.asp?info=没有该主题"
else