读取数据显示的问题,求大神指教

kyou5478 2014-09-30 03:12:55
asdf 1
asdf 阿斯蒂芬离开家
asdf sdf
asdf df

读出来效果是这样的,我想要的效果是右边的显示在一行里,想要这个效果

1
asdf 阿斯蒂芬离开家
sdf
df


左边一栏合并掉,代码在下面,求大神指教有什么方法可以实现

<%
sql="select * from huizong where datediff('d',writedate,now()) between 0 and 6 order by id desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,3,3,1
if not rs.eof then
%>
<% for i=1 to rs.pagesize%>
<table width="971" border="0" cellpadding="0">
<tbody>
<tr>
<td width="70" align="center">asdf</td>
<td class="t1"><%=rs("offlinedeal")%></td>
</tr>
</tbody>
</table>
<%
rs.movenext
if rs.eof then exit for
next
%>
<%
rs.close
set rs=nothing
%>
<%end if%>
...全文
211 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Msxindl_Com 2014-10-09
  • 打赏
  • 举报
回复
<% sql="select * from huizong where datediff('d',writedate,now()) between 0 and 6 order by id desc" set rs=server.CreateObject("adodb.recordset") rs.open sql,conn,3,3,1 dim zs : zs=rs.recordcount if zs>rs.pagesize then zs=rs.pagesize if not rs.eof then %> <table width="971" border="0" cellpadding="0"> <tr> <td rowspan="<%=zs%>" width="70" align="center">asdf</td> <% for i=1 to zs %> <td class="t1"><%=rs("offlinedeal")%></td> </tr> <% if i<zs then %> <tr> <% end if rs.movenext if rs.eof then exit for next %> </table> <% end if rs.close set rs=nothing %>
csdn_aspnet 2014-10-08
  • 打赏
  • 举报
回复
<table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td>你的值asdf </td><!--循环写td--> </tr> </table> </td> <td> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td>asdf对应的值</td><!--循环写td--> </tr> </table> </td> </tr> </table>
rr_1724826853 2014-10-07
  • 打赏
  • 举报
回复
ASP读取数据显示示例 <%@ LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include file="inc/conn.asp"-->//引入数据库连接 <!--#include file="inc/chk.asp"--> //登录权限设置 <% if session("rank")>2 then'判断管理员权限 call Msgbox("你的权限不够!","Back","None") response.End end if %> <% set rs=server.CreateObject("adodb.recordset") sql="select * from g_uang order by photo_time desc" rs.open sql,conn,1,3 %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>广告管理</title> <link href="../style.css" rel="stylesheet" type="text/css"> </head> <body>//CodeGo.net/ <!--#include file="hou_tai.asp"-->//引入管理模块 <table width="700" height="360" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="10" height="368" valign="top" background="../images/left0.gif"><p> </p></td> <td width="819" valign="top"><table width="693" height="188" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="533" height="33"><font color="#990000" size="-1">代号3=留言1:代号4=留言2:代号6=像册1翻页</font></td> <td width="160" valign="bottom"> </td> </tr> <tr> <td height="155" colspan="2"><% If(rs.Eof)Then Response.Write("暂无照片信息!") Else %> <table width="665" border="1" align="center" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#B1C7EC"> <tr> <td width="60" height="30" align="center" nowrap="nowrap"><div align="center" class="STYLE2">广告编号</div></td> <td width="90" align="center" nowrap="nowrap"><div align="center" class="STYLE2">信息</div></td> <td width="146" align="center" nowrap="nowrap"><div align="center" class="STYLE2">广告代号</div></td> <td width="162" align="center" nowrap="nowrap"><div align="center" class="STYLE2">发布时间</div></td> <td width="113" align="center" nowrap="nowrap"><div align="center" class="STYLE2">名称</div></td> <td colspan="2" align="center" nowrap="nowrap"><div align="center" class="STYLE2">操作</div></td> </tr> <% '分页 rs.pagesize=8 page1=clng(request("page1")) if page1<1 then page1=1 rs.absolutepage=page1 for i=1 to rs.pagesize k=rs("p_hoto") %> <tr> <td height="32" align="center"><div align="center" class="STYLE2"><%=rs("ID")%> </div></td> <td align="center" class="STYLE2"><div align="center"><a href="#" onClick="Javascript:window.open('al_xianxi.asp?ID=<%=rs("ID")%>','','width=400,height=320')"><%=rs("name1")%></a>  </div></td> <td align="center" class="STYLE2"><div align="center"><%=rs("p_hoto")%> </div></td> <td align="center" class="STYLE2"><div align="center"><%=rs("photo_time")%> </div> </td> <td align="center" class="STYLE2"><div align="center"><%=rs("picture")%></div> </td> <td width="40" align="center"><div align="center" class="STYLE2"><a href="#" onClick="JScript:window.open('xiu_update.asp?id=<%=rs("id")%>','','width=500,height=365')">修改</a> </div></td> <td width="38" align="center"><div align="center" class="STYLE2"> <a href="#" onClick="if(confirm('是否确认删除?')) {window.location.href='alb_umdel.asp?id=<%=rs("id")%>';}">删除</a></div> </td> </tr> <% rs.movenext if rs.eof then exit for next %> <tr> <td height="30" colspan="7" nowrap="nowrap"><div align="right"> <table width="624" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="right" class="STYLE2"> <% if page1<>1 then%> <a href="<%=path1%>?page1=1">第一页</a> <a href="<%=path1%>?page1=<%=(page1-1)%>"> 上一页</a> <%end if %> <%if page1<>rs.pagecount then%> <a href="<%=path1%>?page1=<%=(page1+1)%>">下一页</a> <a href="<%=path1%>?page1=<%=rs.pagecount%>" >最后一页</a> <%end if%> </div></td> </tr> </table> </div></td> </tr> </table> <%end if%> </td> </tr> </table> <p> </p> </td> <td width="10" valign="top" background="../images/right0.gif"> </td> </tr> </table> </body> </html>

28,391

社区成员

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

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