ASP查询ACCESS不同表问题
来源:百度知道 编辑:UC知道 时间:2024/06/23 08:11:01
<!--#include file="conn.asp"-->
<%
dim sql
dim rs
sql="select server.ID,server.question,server.mine,server.count,server.keyword,server.questiontime,server.answertime,server.content,server.datetime,server.state,yonghu.ID,yonghu.drid,yonghu.mima from server,yonghu where yonghu.id="&request("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<link href="txt.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<table width="450" border="0" align="c
select server.ID,server.question,server.mine,server.count,server.keyword,server.questiontime,server.answertime,server.content,server.datetime,server.state,yonghu.ID,yonghu.drid,yonghu.mima from server,yonghu where yonghu.id=server.id
只有这样每一个相同的id才能对应!或者:
select * from yonghu left join server on yonghu.id=server.id
当然也可以:
select * from server right join yonghu on server.id=yonghu.id
以上三种取出结果并不一定相同,要看你的数据表结构和你……到底要干什么……用!
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../check.asp"-->
<!--#include file="cook.asp"-->
<LINK href="../../style.css" type=text/css rel=stylesheet>
<%
if request.form("Submit")="驳回修改" then
id=request("id")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("update mission set state=-1 where project_id="&id(i)&"&qu