设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 55|回复: 1
打印 上一主题 下一主题

[求助]关于二级连动里的保存入库问题

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-20 01:26:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<%
dim anid
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from diy_class order by anclassidorder asc",conn,1,1
if not(rs1.eof and rs1.bof) then
session("anclasscount")=rs1.recordcount
for i=1 to rs1.recordcount
if rs1.eof then
exit for
end if
anid=rs1("anclassid")
%>
<tr onMouseOver="this.bgColor='#f2f2f2'" onMouseOut="this.bgColor=''">
<td width="120" height="33"> <div align="center">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="134" height="100%" id="table3">
<tr>
<td width="33"> <p align="center"><img src="<% =rs1("pic") %>" border=0 width=18 height=18></td>
<td width="101">
<% =rs1("anclass") %>
</td>
</tr>
</table>
</div></td>
<td width="210" height="33"> <p align="center">
<select name="pro<% =i %>" style="width:342;height:19" onChange="selectpro(document.form1.pro<% =i %>,document.form1.money<% =i %>,document.form1.num<% =i %>,document.form1.proname<% =i %>);">
<option name="0‖0">========
<% =rs1("anclass") %>
========</option>
<%
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from diy_nclass where anclassid="&anid&" order by nclassid asc",conn,1,1
for k=1 to rs2.recordcount
if rs2.eof then
exit for
end if
%>
<option value="<% =rs2("nclass") %>(<% =rs2("danwei") %>)‖<% =rs2("money") %>">
<% =rs2("nclass") %>
(
<% =rs2("danwei") %>
[知识问答ωωω.χiuGoo.сom]
)</option>
<%
rs2.movenext
next
rs2.close
set rs2=nothing
%>
</select>
这是我二级连动的
diy_class是大类
diy_nclass是小类
两类通过anclassid联系
现在我要把选择的大类小类写入库
可是这里有个i怎么写啊
Set rs=server.createobject("adodb.recordset")
sql="select * from diy_nclass"
rs.open sql,conn,3,2
rs.addnew
rs("aa")=request("传递过来的selectname")
rs.update
rs.close
Set rs=Nothing
conn.close
response.write "<script>alert('订单已提交!');this.location.href='zanji1.asp';</SCRIPT>"
response.End
%>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-19 06:16 , Processed in 0.093675 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表