asp如何在标题那显示指定ID号的产品标题

来源:百度知道 编辑:UC知道 时间:2024/06/06 13:04:47
在网页新建了个表格,想在表格内显示某个或多个指定ID的产品标题

<table width="200" border="1">
<tr>

<td>ID号</td>
<td>标题</td>

</tr>

<%
set rs=conn.execute("select * from 表名")
do while not rs.eof
%>

<tr>
<td><%=rs("ID")%></td>
<td><%=rs("title")%></td>
</tr>
<%
rs.movenext
loop
set rs=nothing
rs.close
conn.close
%>

</table>
一看你就懂!

select title from info where id= &id

在数据库先进行筛选,然后用循环输出!