急!急!急!怎样循环取数据库里的值并把值赋给TABLE的一个TD啊
表AA,里面的字段为id(自增) ,linkname,link.我想循环取linkname这一列(数据库里有多少列,就取多少列),并把取出来的linkname这一列放到table的td里,怎么实现啊
<table width="100%" cellpadding="0" style="border-collapse:collapse" border="1" cellspacing="1" bordercolor="#C0C0C0"> <tr align="center"> <% set rs=server.createobject("adodb.recordset") rs.open "select * from Caigou order by id desc",conn,1,1 if not(rs.eof and rs.bof) then do while not rs.eof %> <td height="20"><%=rs("id")%></td><td><%=rs("linkname")%></td><td><%=rs("link")%></td> <% rs.movenext loop end if rs.close set rs=nothing %> </tr> </table>
<table width="150" cellpadding="0" style="border-collapse:collapse" border="1" cellspacing="1" bordercolor="#C0C0C0"> <tr align="center"> <% set rs=server.createobject("adodb.recordset") rs.open "select * from Caigou order by id desc",conn,1,1 if not(rs.eof and rs.bof) then do while not rs.eof %> <td height="20" width="50"><%=rs("id")%></td> <td height="20" width="50"><%=rs("linkname")%></td> <td height="20" width="50"><%=rs("link")%></td> <% rs.movenext loop end if rs.close set rs=nothing %> </tr> </table>