⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 select.asp

📁 数据结构课程设计之最小生成数的K算法的实现 简短 简洁
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<%
username=session("user")
bh=request("bh")
aspname=request("aspname")
x=request.form("xx")
y=request.form("yy")
%>


<link rel="stylesheet" type="text/css" href="../style.css">
<body topmargin="0" leftmargin="0" bgcolor="#dddddd">
<%
bidsql="select * from aspname Where aspname='"& aspname &"'"
set bidrs=server.Createobject("ADODB.Recordset")
bidrs.open bidsql,conn,1,1
bname=bidrs("bname")
%>
<%
if request.form("submit")="添加" then
	zd=request.form("zd")
	op=request.form("op")
	v=request.form("v")
	andor=request.form("andor")
	asql="select * from selectlist"
	set ars=server.Createobject("ADODB.Recordset")
	ars.open asql,conn,1,3
	ars.addnew
	ars("uname")=session("user")
	ars("bname")=bname
	ars("zname")=zd
	ars("op")=op
	ars("val")=v
	ars("andor")=andor
	ars("cc")=x
	ars.update
end if
%>
<%
if y="" then
	ccsql="select top 1 * from selectlist Where uname='"& username &"' and bname='"& bname &"' order by id desc"
	set ccrs=server.Createobject("ADODB.Recordset")
	ccrs.open ccsql,conn,1,1
	if not ccrs.eof then
		x=ccrs("cc")+1
		y=1
	else
		x=1
		y=1
	end if
end if
%>
<%
bsql="select * from BZD_List Where bname='"& bname &"'"
set brs=server.Createobject("ADODB.Recordset")
brs.open bsql,conn,1,1
a=brs.recordcount-1		
%>
<form name="form1" method="post" action="">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td>请选择字段:</td>
    <td>
        <select name="zd" style="width: 120px">
		<%brs.movenext%>
		<%for i=0 to a-1%>
          <option value="<%=brs(2)%>"><%=brs(3)%></option>
		  <%brs.movenext
		  next%>
        </select>
      </td>
    <td>请选择操作符:</td>
    <td><select name="op" id="op" style="width: 120px">
		<option value="0">请选择</option>
	    <option value="=">等于(=)</option>
		<option value="<>">不等于(<>)</option>
		<option value=">">大于(>)</option>
		<option value="<">小于(<)</option>
		<option value=">=">大于等于(>=)</option>
		<option value="<=">小于等于(<=)</option>
		<option value="$">包含于($)</option>
	</select></td>
    <td><input name="v" style="width: 120px;height: 20px"></input></td>
    <td align="right"><select name="andor" style="width: 120px">
	<option value="and">与</option>
	<option value="or">或</option>
	</select></td> 
	 <td ><input type="submit" value="添加" name="submit" style="width: 120px;height: 20px">
	 <INPUT name="xx" type=hidden id="htlx2" value="<%=x%>">
	  <INPUT name="yy" type=hidden id="htlx2" value="<%=y%>">
      </td>
      </td>   
  </tr>
</table>
</form>
  
<table width="90%" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="6" ><div align="center">查询条件集</div></td>
  </tr>
  <tr align="center"> 
    <td width="10%">条件ID</td>
    <td width="20%">查询字段</td>
    <td width="20%">操作符</td>
    <td width="20%">值</td>
    <td width="20%">关系</td>
    <td width="10%">&nbsp;</td>
  </tr>
 <%
abcsql="select * from selectlist where uname='"& username &"' and bname='"& bname &"' and cc='"& x &"'"
set abcrs=server.Createobject("ADODB.Recordset")
abcrs.open abcsql,conn,1,1
b=abcrs.recordcount-1
 %>
<%for i=0 to b%>
  <tr align="center"> 
    <td width="10%"><%=abcrs(0)%></td>
    <td width="20%"><%=abcrs(3)%></td>
    <td width="20%"><%=abcrs(4)%></td>
    <td width="20%"><%=abcrs(5)%></td>
    <td width="20%"><%=abcrs(6)%></td>
    <td width="10%">删除</td>
  </tr>
<%
abcrs.movenext
next%> 
</table>
<form action="choose2.asp?aspname=<%=aspname%>&bh=<%=bh%>" method="post" target="list">
<INPUT name="xxx" type=hidden id="htlx2" value="<%=x%>">
<INPUT name="bname" type=hidden id="htlx2" value="<%=bname%>">
<table width="20%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">
	
        <input type="submit" value="提交查询" name="submitt" style="width: 80px;height: 20px">
      </div></td>
  </tr>
</table>
</form>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -