读取记录排序的问题,急
wxcyz 2005-06-20 04:55:02 用distinct的时候不能排序,也不能传递其它的参数
读取记录的时候不要重复的记录,但是我要按照我安排的排序,还有几个参数也要传递,怎么弄?
只不要prodid的重复记录,其它的都不相同
<%
sql="select * from ProdMain where online=true order by xuhao asc"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.bof and rs.eof then
response.write "您好!新的商品数据库暂时还没有分类"
else
Do While Not rs.eof
%>
<tr>
<td width="100%" height="20"><IMG SRC="gl/images/xtb-02.gif" WIDTH="24" HEIGHT="7" BORDER=0 ALT=""><a href="index.asp?action=2&reid=1&ProdNum=<%=rs("ProdNum")%>&zid=<%=rs("Id")%>"><%=rs("prodid")%></a></td>
</tr>
<% rs.movenext
if rs.eof then
exit do
end if
Loop
end if
set rs=nothing