aso sql语言查询问题

来源:百度知道 编辑:UC知道 时间:2024/05/13 09:58:02
<%
set dbconnection=Server.CREATEOBJECT("ADODB.CONNECTION")
DBPath = Server.MapPath("../data/systemdata.mdb")
dbconnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
SQL="select * from student,choose_course where (choose_course.teachername='"+Session("teachername")+"')and (choose_course.studentid=student.studentid)"
set mystu=dbconnection.execute(SQL)
studentid=mystu("studentid")
studentname=mystu("studentname")
sex=mystu("sex")
collage=mystu("collage")
phonenumber=mystu("phonenumber")
email=mystu("email")
birthday=mystu("birthday")

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>myclass</title>
<style type="text/css"&

改过了:

<%
set dbconnection=Server.CREATEOBJECT("ADODB.CONNECTION")
DBPath = Server.MapPath("../data/systemdata.mdb")
dbconnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
SQL="select * from student,choose_course where (choose_course.teachername='"+Session("teachername")+"')and (choose_course.studentid=student.studentid)"
set mystu=dbconnection.execute(SQL)
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>myclass</title>
<style type="text/css">
<!--
body {
margin-top: 0mm;
}
body,td,th {
font-size: 14px;
}
-->
</style></head>

<body>
<table width="618" border="0" align="center"