谁帮我改这一下asp条件查询代码

来源:百度知道 编辑:UC知道 时间:2024/05/11 04:47:58
想以Product表里的Product_Signing字段名为条件,只显示Product_Signing字段名里"是"的内容,Product_Signing是varchar字符类型

<%
if not rs.eof then
i=0
set rsParent=server.createobject("adodb.recordset")
sqltext="select * from [Product]"
rsParent.open sqltext,conn,1,1
do while not rs.eof
%>

<tr>

<td width="18%" height="19" align="center" bgcolor="#F5F5F5"><%=rs("Product_name")%></td>
<td width="20%" height="19" align="center" bgcolor="#F5F5F5"><%=rs("Product_Content")%></td>
<td width="10%" height="19" align="center" bgcolor="#F5F5F5"><%=rs("Product_Amount")%></td>
<td width="10%" height="19" align="center" bgcolor="#F5F5F5"&

sqltext="select * from [Product] where Product_Signing='是'"

可能是本人水平不高,楼上的说的我实验都不可以。
我在自己的asp网页调试中,数据库加了一个列设置名字为check 类型是"是/否"然后在查询的条件中加入
where check=true 条件,就只查询到所有打钩也是就"是"的资料,也就是说你的代码改为:
sqltext="select * from [Product]" where XX=true
其中XX是你用来设置"是/否"的那个列的名字

不知道和你说的是不是一个东西