select where in (文本字段)查询不了结果
维维天下 2011-01-07 10:55:54 <%
dim bookid,action,i
action=request.QueryString("action")
if request.QueryString("id")="" then
bookid=request("id")
else
bookid=request.QueryString("id")
end if
if bookid="" then
response.write "<script language=javascript>alert('对不起,您没有选择商品!');window.location.reload('javascript:window.close()')</script>"
response.End
end if
select case action
'//////////////////////////////////
case ""
set rs=server.CreateObject("adodb.recordset")
rs.open "select id,name,RKDJ,XSDJ,CNum from cx where id in ('"&bookid&"')",conn,1,1%> <table width="740" border="0" cellspacing="0" cellpadding="0">
<tr><td background="img/bg-740-top.gif"><img src="img/k.gif" alt="缝纫线查询" width="1" height="16"></td></tr>
<tr>
<td bgcolor="#35383C">
<table width=600 border="0" align="center">
<form name="form1" method="post" action="">
<tr>
<td bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">商品名称</font></div></td>
<td bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">市场价</font></div></td>
<td bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">库存数</font></div></td>
<td bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">数量</font></div></td>
<td bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">小计</font></div></td>
<td bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">修改数量</font></div></td>
</tr>
<%dim iii '定义总价
iii=0
dim bookscount,books '定义判断有几个bookid
bookscount=request.QueryString("id").count
do while not rs.eof
dim quatity '判断input 名
Quatity = CInt( Request( "ckxp"&rs("id")) )
If Quatity <=0 Then Quatity = 1
%>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 5px'>
<%=rs("id")%>
<input type=hidden name=bookname value=<%=rs("id")%>></td>
<td bgcolor="#EFF5FE"><div align="center"><%=rs("RKDJ")&"元"%></div>
<input type=hidden name=huiyuanjia value=<%=rs("XSDJ")%>></td>
<td bgcolor="#EFF5FE"><div align="center"><font color="#CC0000"><strong><%=rs("CNum")&"个"%></strong></font></div></td>
<td bgcolor="#EFF5FE"><div align="center">
<input name="<%="ckxp"& rs("id")%>" type="text" size="3" value="<%=Quatity%>" onkeypress= "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"onpaste = "return regInput(this,/^[0-9]*$/, window.clipboardData.getData('Text'))"ondrop= "return regInput(this,/^[0-9]*$/,event.dataTransfer.getData('Text'))">
</div></td>
<td bgcolor="#EFF5FE"><div align="center">
</div></td>
<td bgcolor="#EFF5FE"><div align="center">
<input type="submit" name="Submit" value="修改" onclick="this.form.action='shopping.asp?id=<%=bookid%>';this.form.submit()">
</div></td>
</tr>
<%
if bookscount=1 then books=rs("id")
rs.movenext
loop
rs.close
set rs=nothing%>
改成 rs.open "select id,name,RKDJ,XSDJ,CNum from cx where id = '"&bookid&"'",conn,1,1%> 也没用