请问ASP高手

jerrycool 2003-08-19 11:18:34
我用的是动网的BBS,我想查询数据库中最近发的十个贴子的作者,主题,最后回复时间,回复人。请问该怎么写(查询语句)????
...全文
46 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
jerrycool 2003-08-19
  • 打赏
  • 举报
回复
那个文件是错的,最后回复人和作者老是一样
yaozhg 2003-08-19
  • 打赏
  • 举报
回复
动网本身好象也有那个文件。不如你看看。

或者直接用那个文件。。。。。套
czylz 2003-08-19
  • 打赏
  • 举报
回复
<table width="150" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> <td> <form action="search.asp" method="post" name="search" onSubmit="return checkinput()">
<input type="text" name="keyword" size="16" maxlength="30" onFocus=this.value='' class="put">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td height="3"></td></tr>
</tbody> </table><select name="typeid" class="put"> <option selected value="0">全部内容</option>
<%
rst.open "select * from type",conn,1
do while NOT rst.EOF
%> <option value="<%=rst("typeid")%>"><%=rst("type")%></option> <%
rst.MoveNext
loop
rst.close
%> </select> <input type="Image" src="图片连接地址" align="absmiddle" width="51" height="22" title="查询" id=Image1 name=Image1>
</form></td></tr> </table>
jerrycool 2003-08-19
  • 打赏
  • 举报
回复
不行啊。lastpost显示的是回复人还有内容啊。还有一些$之类的怪字符,怎么去掉这两个
业余程序员 2003-08-19
  • 打赏
  • 举报
回复
多给点分啊~~~
业余程序员 2003-08-19
  • 打赏
  • 举报
回复
不行的话, 把整个程序发在页面上或者QQ:55653793
业余程序员 2003-08-19
  • 打赏
  • 举报
回复
dim tt_num
select top 10 postusername,title,lastposttime,lastpost from topic

<table width=100 height=1000 ..>
<tr>
<% for tt_num=1 to 10 %>
<td><% =rs("postusername)"%><% =rs("title")%><% =rs("lastposttime")%><% =rs("lastpost")%></td>
<%
rs.movenext '记录下移一条
next %>
</tr>
</table>
jerrycool 2003-08-19
  • 打赏
  • 举报
回复
原来是在表“topic"中啊,昨天有个网友说,在中BBS1中呢??到底是哪个???
jerrycool 2003-08-19
  • 打赏
  • 举报
回复
这个我知道。我是说查询后,这个怎么写,如:显示作者名字rs("username")
但在那张表中好像主题的字段有些为空,但提供交表单时又不能为空,这个rs("")怎么写呢???回复人又怎么写???
甘泉123 2003-08-19
  • 打赏
  • 举报
回复
select top 10 postusername,title,lastposttime,lastpost from topic
54duke 2003-08-19
  • 打赏
  • 举报
回复
同意 补充一下 xxx 为你数据库的字段名
bushido 2003-08-19
  • 打赏
  • 举报
回复
select top 10 * from xxx order by id desc

28,390

社区成员

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

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