Set rst = Server.CreateObject("ADODB.RecordSet")
sqlt="select * from wtsp order by id desc"
rst.Open sqlt,conn,3,3
do while not rst.eof
sql="select * from mainall where shangpinmingcheng='"&rst("shangpinmingcheng")&"' order by id desc"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,3,3
rst.movenext
loop
rst.close
set rst=nothing
以上代码只能查询 wtsp 表的第一条记录
请问怎么修改才是完美的呢?
|