各位帮我解决个小问题,如何将ASP里面的数据写入一个表格,用两列显示

来源:百度知道 编辑:UC知道 时间:2024/05/30 19:40:38
<% set rs=server.createobject("adodb.recordset")
sql="select * from all_model where type='ts' and pl>100 and pl<150 "
rs.open sql,conn,1,1

do while not rs.eof
typet=rs("model")
%>
<LI><a href="search1.asp?types=<%=rs("model")%>&type=1"><%=typet%></a><font color="#FF0000"></font></LI>
<%
rs.movenext
loop
rs.close
%>
。。。。。
二楼的哥哥,还是有问题,要不你自己到你机子上调试下,从SQL数据库的一个表里读取一个字段,吧字段里面所有的记录放到一个两列的表格里面(不能重复啊),其他的我自己来搞定,好了就发给我就行了,我已经追加了些分值,因为你很热心嘛,最好是能告诉我你的QQ,我还是新手,正在学习阶段啊,5821871,这是我的QQ~!多多指教啊~!

改了,你再看下
<% set rs=server.createobject("adodb.recordset")
sql="select * from all_model where type='ts' and pl>100 and pl<150 "
rs.open sql,conn,1,1
response.write "<table>"
str1="<tr>"
str2="<tr>"
do while not rs.eof
str1=str1+"<td>"&rs("model")&"</td>"
str2=str2+"<td>"&rs("typet")&"</td>"

rs.movenext
loop
rs.close
str1=str1+"</tr>"
str2=str2+"</tr>"
response.write str1&str2&"</table>"
%>

<table>
<%while not rs.eof%>
<tr>
<%for(i=0;i++;i<rs.count)
<td>
<%rs.("字段1")%>
</td>
<td>
<%rs.("字段2")%>
</td>
<%next%>
</tr>
<%lo