[求助]多表查询有误
各老师:各老师,我实现多表查询,我用了以下错误的代码,请问怎么修改呀,谢谢!
<tr valign="middle" class="tdbg" onMouseOver="this.style.backgroundColor='#F6FcF9'" onMouseOut="this.style.backgroundColor=''">
<%
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select ID,OPERATOR,BALANCETYPE,ODDNUMBERS FROM [ESDISPATCH] WHERE ODDNUMBERS like '%"&trim(request("ODDNUMBERS"))&"%'"
rs.open sql,conn,1,1
%>
<td align="center" nowrap ><div align="center"><%=rs("ODDNUMBERS")%></div></td>
<%
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select CUSTOMERCODE,CUSTOMERNAME,CUSTOMERRELATION,MONEY FROM [customer] WHERE CUSTOMERCODE like '%"&trim(request("CUSTOMERCODE"))&"%' OR CUSTOMERNAME like '%"&trim(request("CUSTOMERCODE"))&"%'"
rs.open sql,conn,1,1
%>
<td align="center" nowrap ><div align="center"><%=rs("CUSTOMERNAME")%></div></td>
<td width="6%" height="20" align="center" nowrap ><div align="center"><a href="wyfz_esdispatch.asp?action=modif&ID=<%=rs("ID")%>&CUSTOMERCODE=<%=rs("CUSTOMERCODE")%>&CUSTOMERNAME=<%=rs("CUSTOMERNAME")%>&CUSTOMERRELATION=<%=rs("CUSTOMERRELATION")%>&OPERATOR=<%=rs("OPERATOR")%>&MONEY=<%=rs("MONEY")%>&BALANCETYPE=<%=rs("BALANCETYPE")%>&ODDNUMBERS=<%=rs("ODDNUMBERS")%>" id=sfqueren>是否确认?</a></div></td>
</tr>
[此贴子已经被作者于2007-1-4 13:47:42编辑过]