急等,高手看下代码

来源:百度知道 编辑:UC知道 时间:2024/05/22 23:55:42
<!--#include file="conn.asp" -->
<%
dim id2,id

set rs=server.createobject("adodb.recordset")
sql="select customer.customerid,customer.customername,booking.bongkingdate from customer left join booking on customer.customerid=booking.customerid where customerid=" & id2
rs.open sql,conn,3,2
id2=request.QueryString("id2")

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>

<p align="left"> Customer</p>

<table width="383" height="58" border="1">

<tr>
<td height="24">customerid</td>
<td>customername</td>
</tr>
<% do until rs.eof %>
&l

<%
dim id2,id

set rs=server.createobject("adodb.recordset")
sql="select customer.customerid,customer.customername,booking.bongkingdate from customer left join booking on customer.customerid=booking.customerid where customerid=" & id2
rs.open sql,conn,3,2
id2=request.QueryString("id2")

%>

改为
<%
dim id2,id
id2=request.QueryString("id2")
set rs=server.createobject("adodb.recordset")
sql="select customer.customerid,customer.customername,booking.bongkingdate from customer left join booking on customer.customerid=booking.customerid where customerid='" & id2
rs.open sql,conn,3,2

%>

这样就行了

dim id2,id
id2=request.QueryString("id2")

set rs=server.createobject("adodb.recordset")
sql="select customer.customerid,customer.customername,booking.bongkingdate