注册 登录
编程论坛 ASP技术论坛

各位大侠帮忙看下下面这个为什么不显示?

故乡的云 发布于 2011-08-28 11:24, 375 次点击
以下程序想要实现 country 中的operator显示,我制作了一也页面显示所有的country , 然后
我点页面中的china转到下面这个页面,可为什么没有任何显示呢?
数据库如下;
=================
id country operator
1 china CMCC
2 india airtel
==================
<!--#include file="conn.asp"-->
<html >
<head>

</head>
<%  
dim rs
dim sql
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select operator from info where country='"&request("country")&"'"
rs.open sql,conn,1,1
%>


<body>

<table width="200" border="1">
<% do while not rs.eof %>
  <tr>
  <td> <%=rs("Operator")%> </td>

  </tr>
  <% rs.movenext   
loop  
rs.close
conn.close   
  %>
</table>
<p>&nbsp; </p>
</body>
</html>

-----------------
按道理应该显示CMCC的
1 回复
#2
yms1232011-08-28 13:49
request("country")
这个你确定收到值?
1