标题:寻求if 判断问题!
只看楼主
zhy328
Rank: 1
等 级:新手上路
帖 子:118
专家分:0
注 册:2007-8-9
结帖率:100%
 问题点数:0 回复次数:2 
寻求if 判断问题!
<%set rs=server.createobject("adodb.recordset")                     
sql="select * from SMT_price order by SMT_id desc"
rs.open sql,conn,1,1     
set rs1=server.CreateObject("adodb.recordset")
sql="select * from SMT_member where SMT_company_id="& ypid
rs1.open sql,conn,1,1
%>
<td><%if rs1("SMT_comphone")="" then
response.write rs("SMT_phone")
else
response.write rs1("SMT_comphone")
end if%></td>
提示是错误类型:(0x80020009)发生意外
哪里出现问题了?
搜索更多相关主题的帖子: 判断 
2008-01-31 16:15
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
得分:0 
sql="select * from SMT_member where SMT_company_id="& ypid
rs1.open sql,conn,1,1
改成
sql1="select * from SMT_member where SMT_company_id="& ypid
rs1.open sql1,conn,1,1

<td><%if rs1("SMT_comphone")="" then
response.write rs("SMT_phone")
else
response.write rs1("SMT_comphone")
end if%></td>
改成
<td><%if isnull(rs1("SMT_comphone")) then
response.write rs("SMT_phone")
else
response.write rs1("SMT_comphone")
end if%></td>
2008-01-31 16:18
heyufu
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2007-7-26
得分:0 
支持楼上的

2008-01-31 17:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-199205-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.078510 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved