下面的代码只能1列显示 如果控制让他2列显示呀
(调用数据库图,库里有6大类,前面调用的是每一大类的一张图片,一共6张.也就是让他3行2列显示)
<table width="540" height="189" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<% dim sort_id
set rssort=server.CreateObject("adodb.recordset")
sqlsort="select * from sort order by sort_id asc"
rssort.open sqlsort,conn,1,2
do until rssort.eof
sort_id = rssort("sort_id")%>
<table width="172" border="0" align="center" cellpadding="0" cellspacing="0" >
<!--DWLayoutTable-->
<tr>
<%
set rs1=server.CreateObject("adodb.recordset")
sql="select top 1 * from hw where sort_id="& sort_id
rs1.open sql,conn,1,2
%>
<%
if not rs1.eof then
%>
<td width="546" valign="top" ><table height="207" align="left" cellpadding="0" cellspacing="0" class="as">
<tr>
<td width="169" height="192" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="299" height="18" valign="middle">
<a href="pro_dl.asp" target=_blank><img height="210" width="170" src="<%=rs1("hw_pic")%>" alt="点击查看商品:" border="0"></a></td>
</tr>
<tr>
<td width="299" height="43" valign="middle"><div align="center"><%=rssort("sort_name")%> 浏览次数:<%=rs1("click")%>
</div></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<%end if%>
<%rs1.close
set rs1=nothing %>
</table>
<%
rssort.movenext
loop
rssort.close
set rssort=nothing
%></td>
</tr>
</table>
这段代码加在哪?会就加上在贴过来,我也加过但是不行,(就是刷新就加浏览次数的代码加到哪? )
<%
if not rs1.eof then
i=1
do while not rs1.eof%>
<%end if
rs1("click") = rs1("click")+1
rs1.update
rs1.movenext
i=i+1
loop
rs1.close
end if
%>
[此贴子已经被作者于2007-9-8 14:14:55编辑过]