select语句
%
set rs1=server.createobject( "adodb.recordset ")
sql= "select * from workclass order by workid "
set rs1=conn.execute(sql)
do while not rs1.eof
%> <tr> <td> <%=rs1( "workclass ")%> </td> </tr>
<tr> <td>
<%set rs=server.createobject( "adodb.recordset ")
'select的where语句有问题
sql= "select * from worker where workid= ' "&rs1( "workid ")& " ' order by id "
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write " <p align= 'center '> 对不起,没有您要查询的信息 </p> "
else
%>
<table width=98% border= "0 " cellspacing= "0 " cellpadding= "0 ">
<%do while not rs.eof%> <tr>
<td> <%=rs( "worker ")%> </td> </tr>
<%
rs.movenext
loop
rs.close
%>
</table> </td> </tr>
<%
end if
rs1.movenext
loop
rs1.close%> </table>
见注解部分!
------解决方案--------------------sql= "select * from worker where workid= " & rs1( "workid ") & " order by id "