|
<%
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
%> |
|