[跪求]如何在这种情况下分页?各位高手请进~~~
我的问题如下:
---------------------
现在我要调一个表中的数据,但是要一条显示求购,一条显示出售,如:
==========================================================================
交易类型 焦点物业 户型 所属区域 售价(万元) 发布时间
[出售] 西二环 2室1厅 城东 30 3-13
[求购] 杏园小区 1室1厅 城东 28 3-13
[出售] 太白小区 2室1厅 城东 20 3-13
[求购] 枫叶南区 1室1厅 城南 16 3-13
首页 上页 下页 尾页
==========================================================================
数据一条出售,一条求购这样的显示是可以做出来了,关键难在分页了,请高手指点!
我做出一条隔一条显示的代码如下:
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr bgcolor="#FFCC99">
<td width="63" align="center"><strong>交易类型</strong></td>
<td width="160" align="center"><strong><font color="#CC0000">焦点物业</font></strong></td>
<td width="63" align="center"><strong>户型</strong></td>
<td width="73" align="center"><strong>售价(万元)</strong></td>
<td width="63" align="center"><strong>发布时间</strong></td>
</tr>
<%
Sql="Select * from Second_Info where Second_Type='出售' order by Second_ID desc"
Set Rs=Server.CreateObject("Adodb.Recordset")
Sql2="Select * from Second_Info where Second_Type='求购' order by Second_ID desc"
Set Rs2=Server.CreateObject("Adodb.Recordset")
Rs2.Open Sql2,Conn,1,1
Rs.Open Sql,Conn,1,1
Do while not Rs.eof
do while not Rs2.Eof
%>
<tr bgcolor="#FFFFFF">
<td align="center"><font color="#009900"><%=Rs("Second_Type")%></font></td>
<td>西二环任家口小区<font color="#FF0000">new!</font></td>
<td align="center">2室1厅</td>
<td align="center"><font color="#FF0000"><strong>16</strong></font></td>
<td align="center">3-13</td>
</tr>
<%
Rs.Movenext
%>
<tr bgcolor="#f3f3f3">
<td align="center"><font color="#FF0000"><%=Rs2("Second_Type")%></font></td>
<td>杏园小区<font color="#FF0000">new!</font></td>
<td align="center">1室1厅</td>
<td align="center"><font color="#FF0000"><strong>28.50</strong></font></td>
<td align="center">3-13</td>
</tr>
<%
Rs2.movenext
Loop
loop
%>
</table>