asp中怎么输出一行2列

来源:百度知道 编辑:UC知道 时间:2024/06/05 06:33:26
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<%
set rsa=server.createobject("adodb.recordset")
sql="SELECT * FROM smallclass where lanmu_id=26 and smallclass_id<>54 ORDER BY smallclassorder"
rsa.open sql,conn,2,2
if rsa.bof and rsa.eof then
end if
if not rsa.eof then
do while not rsa.eof
smallclass_id=rsa("smallclass_id")
%>
<tr>
<td width="12%" align="center" class="left_cpbg"> </td>
<td width="88%" align="left" class="left_cpbg"><a href="cptype.asp?smallclass_id=<% =smallclass_id%>" style="color:#cccccc;"><%=rsa("smallclassname")%></a></td>
</tr>
<%
rsa.movenext
loop
end if
rsa.close
se

<table width="90%" border="0" cellspacing="0" cellpadding="0">
<%
set rsa=server.createobject("adodb.recordset")
sql="SELECT * FROM smallclass where lanmu_id=26 and smallclass_id<>54 ORDER BY smallclassorder"
rsa.open sql,conn,2,2
if rsa.bof and rsa.eof then
end if
if not rsa.eof then
do while not rsa.eof
%>
<tr>
<%
for i=1 to 2
if not rsa.eof then
smallclass_id=rsa("smallclass_id")
smallclassname=rsa("smallclassname")
rsa.movenext
else
smallclassname=""
smallclass_id=""
end if
%>
<td width="50%" align="left" class="left_cpbg"><a href="cptype.asp?smallclass_id=<% =smallclass_id%>" style="color:#cccccc;"><%=smallclassname%></a></td>
<