回 帖 发 新 帖 刷新版面

主题:[讨论]关于数据调用

[img]http://www.wahahasolar.com/download/111.jpg[/img]


会员注册资料数据表info

[img]http://www.wahahasolar.com/download/222.jpg[/img]

信息发布数据表message

其中message中的info_id等于info中的id,我是用Session保存登陆信息的

我在pro_show.asp加入了
<%
sql="select *  from info where id='"&username&"'"
rs.open sql,conn,1,1
if not rs.eof then%>

在要显示发布信息的公司名称、电话、邮箱的地方加入

公司名称:<%=rs("公司名称")%><br>
电话:<%=rs("电话")%><br>
邮箱:<%=rs("邮箱")%><br>


但是不能调试成功,请高手帮忙砍下错哪里了

回复列表 (共1个回复)

沙发

sql="select *  from info where id='"&username&"'"
id怎么和username相等?
username是什么内容?
sql="select *  from info where id="&username
再试试这个

我来回复

您尚未登录,请登录后再回复。点此登录或注册