| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 632 人关注过本帖
标题:同时传参,虽然比较繁琐,还是能用的。求简化
取消只看楼主 加入收藏
ashimaxigo
Rank: 2
等 级:论坛游民
帖 子:29
专家分:17
注 册:2012-12-24
结帖率:75%
收藏
已结贴  问题点数:14 回复次数:2 
同时传参,虽然比较繁琐,还是能用的。求简化
<%@language=vbscript%>
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from zhizgy"
rs.open sql,conn,1,3
dim nMax,nMin,a,b,c,n,n1,n2,s,i
       gdangw=request("gdangw1") '写入1档
       a=request("gya01")
       b=request("gyb01")
       c=request("gyc01")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw2") '写入2档
       a=request("gya02")
       b=request("gyb02")
       c=request("gyc02")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw3") '写入3档
       a=request("gya03")
       b=request("gyb03")
       c=request("gyc03")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw4") '写入4档
       a=request("gya04")
       b=request("gyb04")
       c=request("gyc04")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw5") '写入5档
       a=request("gya05")
       b=request("gyb05")
       c=request("gyc05")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw6") '写入6档
       a=request("gya06")
       b=request("gyb06")
       c=request("gyc06")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw7") '写入7档
       a=request("gya07")
       b=request("gyb07")
       c=request("gyc07")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw8") '写入8档
       a=request("gya08")
       b=request("gyb08")
       c=request("gyc08")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw9") '写入9档
       a=request("gya09")
       b=request("gyb09")
       c=request("gyc09")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw10") '写入10档
       a=request("gya010")
       b=request("gyb010")
       c=request("gyc010")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw11") '写入11档
       a=request("gya011")
       b=request("gyb011")
       c=request("gyc011")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw12") '写入12档
       a=request("gya012")
       b=request("gyb012")
       c=request("gyc012")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw13") '写入13档
       a=request("gya013")
       b=request("gyb013")
       c=request("gyc013")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw14") '写入14档
       a=request("gya014")
       b=request("gyb014")
       c=request("gyc014")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
           gdangw=request("gdangw15") '写入15档
       a=request("gya015")
       b=request("gyb015")
       c=request("gyc015")
       nMax=a
       nMin=a           
       if (a>b) and (b>c)then
           nMax=a
           nMin=c
           end if
      
       if (a>c) and (c>b)then
           nMax=a
           nMin=b
       end if
      
       if (b>a) and (a>c)then
           nMax=b
           nMin=c
       end if
      
       if (b>c) and (c>a)then
           nMax=b
           nMin=a
       end if
      
       if (c>a) and (a>b)then
           nMax=c
           nMin=b
       end if
      
       if (c>b) and (b>a)then
           nMax=c
           nMin=a
       end if
      
       if (a=b) and (a>c)then
           nMax=a'也等于b
           nMin=c
       end if
       if (a=b) and (a<c)then
           nMax=c
           nMin=a
       end if
      
       if (b=c) and (b>a)then
           nMax=b'也等于c
           nMin=a
       end if
       if (b=c) and (b<a)then
           nMax=a
           nMin=b
       end if
      
       if (c=a) and (c>b)then
           nMax=c'也等于a
           nMin=b
       end if
       if (c=a) and (c<b)then
           nMax=b
           nMin=c
       end if
      
       if (a=b) and (b=c)then
           s=0
       end if
        s=((nMax-nMin)/nMin)
    rs.addnew
    rs("gya0")=a
    rs("gyb0")=b
    rs("gyc0")=c
    rs("gwuc")=s
    rs("gdangw")=gdangw
    rs.update
    rs.movenext
%>



[ 本帖最后由 ashimaxigo 于 2013-1-17 23:07 编辑 ]
搜索更多相关主题的帖子: sql 还是 request include file sql 还是 request include file sql 还是 request include file 
2013-01-17 23:04
ashimaxigo
Rank: 2
等 级:论坛游民
帖 子:29
专家分:17
注 册:2012-12-24
收藏
得分:0 
hhhhhhhhha
2013-01-18 19:57
ashimaxigo
Rank: 2
等 级:论坛游民
帖 子:29
专家分:17
注 册:2012-12-24
收藏
得分:0 
复制粘贴我最懂
2013-01-18 19:58
快速回复:同时传参,虽然比较繁琐,还是能用的。求简化
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.059146 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved