asp do while 循环嵌套问题
setrsxlh1=server.createobject("adodb.recordset")setrsxlh2=server.createobject("adodb....
set rsxlh1=server.createobject("adodb.recordset")
set rsxlh2=server.createobject("adodb.recordset")
set rsxljl=server.createobject("adodb.recordset")
dim filename_2
dim filename_1
sqlxlh1="selcet * from xuliehao"
rsxlh1.open sqlxlh1,conn,3,3
do while not rsxlh1.eof
filename_1=rsxlh1("xulie_hao")
filename_2=Split(filename_1,"*")
sqlxlh2="select * from shangpinxiaoshou where sp_shangpin_name='黄金眼版'"
rsxlh2.open sqlxlh2,conn,3,3
do while not rsxlh2.eof
if rsxlh2("sp_number")=filename_2(0) then
sqljl="select * from xuliehao_jilu"
rsxljl.open sqljl,conn,3,3
rsxljl.addnew
rsxljl("jilu_xuliehao")=rsxlh2("sp_number")
rsxljl("jilu_cishu")=rsxljl("jilu_cishu")+1
rsxljl.Update
rsxljl.close
end if
rsxlh2.movenext
loop
rsxlh2.close
rsxlh1.movenext
loop
rsxlh1.close
大家看看 帮帮忙 看看有没有错误 执行时有错啊
报 500 错误。。 展开
set rsxlh2=server.createobject("adodb.recordset")
set rsxljl=server.createobject("adodb.recordset")
dim filename_2
dim filename_1
sqlxlh1="selcet * from xuliehao"
rsxlh1.open sqlxlh1,conn,3,3
do while not rsxlh1.eof
filename_1=rsxlh1("xulie_hao")
filename_2=Split(filename_1,"*")
sqlxlh2="select * from shangpinxiaoshou where sp_shangpin_name='黄金眼版'"
rsxlh2.open sqlxlh2,conn,3,3
do while not rsxlh2.eof
if rsxlh2("sp_number")=filename_2(0) then
sqljl="select * from xuliehao_jilu"
rsxljl.open sqljl,conn,3,3
rsxljl.addnew
rsxljl("jilu_xuliehao")=rsxlh2("sp_number")
rsxljl("jilu_cishu")=rsxljl("jilu_cishu")+1
rsxljl.Update
rsxljl.close
end if
rsxlh2.movenext
loop
rsxlh2.close
rsxlh1.movenext
loop
rsxlh1.close
大家看看 帮帮忙 看看有没有错误 执行时有错啊
报 500 错误。。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询