求一简单的ASP查询功能

来源:百度知道 编辑:UC知道 时间:2024/06/23 17:31:59
现有这样一个数据结构

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>学生资料</title>
</head>

<body>
<table border='1' cellspacing='0' cellpadding='0'><tr><td><tr>
<td>2000011</td>
<td>刘晓 </td>
<td>男 </td>
<td>40 </td>
<td>计算机 </td>
</tr>
<p><br>
<tr>
<td>20000

小意思sex.asp

<!--#include file="conn.asp"--> '连接数据库
<% xb=request("sex")%> '接收性别变量
<%
set rst=server.createobject("adodb.recordset")
sql="select * from stud where sex='"&xb&"'"
rst.open sql,conn,1,1
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>学生资料</title>
</head>

<body>
<table border='1' cellspacing='0&