一个排序的问题!==(急){在线等代}

cnpr 2003-07-14 02:26:55
数据库中有N条记录。

我想让它这样排序(如下:)


a b c
d e f
g h ....

这样的排序。请大家帮帮我。谢谢!!!
...全文
28 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
cnpr 2003-07-14
  • 打赏
  • 举报
回复
thanks......

all friends!!


bubuy 2003-07-14
  • 打赏
  • 举报
回复
上面response.write "br"写错了,下面这样
dim i
i=0
whlie not rs.eof
i=i+1
response.write rs("字段")
if i mod 3 =0 then
response.write "<br>"
end if
rs.movenext

wend
eduxh 2003-07-14
  • 打赏
  • 举报
回复
把loop改成wend
eduxh 2003-07-14
  • 打赏
  • 举报
回复
把loop改成wend
bubuy 2003-07-14
  • 打赏
  • 举报
回复
dim i
i=0
whlie not rs.eof
i=i+1
response.write rs("字段")
if i mod 3 =0 then
response.write "br"
end if
rs.movenext

wend
eduxh 2003-07-14
  • 打赏
  • 举报
回复
i=0
while not rs.eof
if i=0 then
response.write "<tr>"
end if
response.write "<td>.......</td>"
i=i+1
if i=3 then
response.write "</tr>"
i=0
end if
rs.movenext
loop
if i!=0 then
for i=i to 3
response.write "<td></td>"
next
response.write "</tr>"
end if
xiaobird1 2003-07-14
  • 打赏
  • 举报
回复
SELECT * from 表名 ORDER BY 字段名
...
i = 1
while not rs.EOF
Response.write rs("字段")
if i = 3 then
Response.write "<br>"
end if
i = i + 1
wend
Jaron 2003-07-14
  • 打赏
  • 举报
回复
SELECT * from 表名 ORDER BY 字段名 [DESC]

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧