asp 查询个人信息 帮忙看看哪儿错了

来源:百度知道 编辑:UC知道 时间:2024/06/01 23:03:32
<!-- #include file="conn.asp" -->
<%
ID=request.queryString("学生ID")
sqlstr="select student.学生ID,姓名,性别,出生年月,电话,地址,系别,密码 from student,user where student.学生ID=user.学生ID and student.学生ID='"&ID&"'"
set rs=conn.execute(sqlstr)
%>
<HTML>
<head>
<title>通讯录列表</title>
</head>
<body>
<center>
<p align="center"></center><b>个人信息</b>
<table border="1">
<tbody>
<tr>
<td align=middle" width="12%" bgcolor="#D6D3CE">学生ID</td>
<td align=middle" width="12%" bgcolor="#D6D3CE">姓名</td>
<td align=middle" width="12%" bgcolor="#D6D3CE">性别</td>
<td align=middle" width="12%" bgcolor="#D6D3CE&

sqlstr="select student.学生ID,姓名,性别,出生年月,电话,地址,系别,密码 from student,user where student.学生ID=user.学生ID and student.学生ID='"&ID&"'"
这里不对,应该在姓名之前也加上表名student!!其他的字段也是,怎么第一个会加,其他的就不加了呢??