asp数据库筛选显示数据问题
下面这段代码可以正常显示‘cm110表xingbie字段’男女所有数据,如果我只要显示‘男’该改哪段代码。<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open Server.MapPath("data.mdb")
set rs=conn.Execute("Select * from cm110")
Response.Write "<table border=1>"
While Not rs.EOF
Response.Write "<tr>"
For i = 1 To 4
If rs.EOf Then
Response.Write "<td></td><td></td>"
Else
Response.Write "<td>" & rs("xingbie") & "</td>" //这里是性别字段,里面保存的值只有男和女
rs.MoveNext
End If
Next
Response.Write "</tr>"
Wend
Response.Write "</table>"
%>
[ 本帖最后由 mingniu66 于 2012-11-27 16:09 编辑 ]