标题: 多表查询的时候如何显示多个字段? [打印本页] 作者: o.筎茈菰箪き 时间: 2010-1-20 02:52 标题: 多表查询的时候如何显示多个字段? 在下面的代码中怎样让它显示多个字段的值?比如还有class_1.name之类的.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%set rs=server.CreateObject("adodb.recordset")
sql="select count(product.category_id) as name from product inner join class_1 on product.category_id=class_1.id where class_1.id=404"
[知识问答ωωω.χiuGoo.сom]
'do while not rs.eof
rs.open sql,conn,1,1%>
<tr>
<td><%=rs("name")%></td>
</tr>
<%
rs.movenext
' loop
rs.close
set rs=nothing%>作者: seeYa 时间: 2010-1-20 02:52
select count(product.category_id) as name2,class_1.name from product inner join class_1 on product.category_id=class_1.id where class_1.id=404