TSYS一个新闻多种特性时如何进行前台更新?
程序员文章站
2023-10-20 13:31:01
access数据库用的方法: instr(','+speciality+',',',2,')<>0 完整的代码如下:复制代码 代码如下:function&nbs...
access数据库用的方法:
instr(','+speciality+',',',2,')<>0
完整的代码如下:
如果这段使用在sql中会提示'instr' 不是可以识别的 函数名。
sql数据库更新应用:
dbo.isspeciality(speciality,'2')>0
完整代码如下:
instr(','+speciality+',',',2,')<>0
完整的代码如下:
复制代码 代码如下:
function update08()
dim templatefilepath
templatefilepath=server.mappath("../../../default.htm")
dim tclass,strhtml
set tclass=new tkl_templateclass
strhtml=""
dim rs,sql
sql="select top 8 title,filepath,addtime from view_newsinfo where instr(','+speciality+',',',18,')<>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
strhtml=strhtml&"·[" & strclass.formatmydate(rs("addtime"),"{m}/{d}") & "]<a href=""" & rs("filepath") & """ target=""_blank"">" & rs("title") & "</a><br>" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
with tclass
.opentemplate(templatefilepath)
.startelement="<!--downrecommand:start-->"
.endelement="<!--downrecommand:end-->"
.value=strhtml
.replacetemplate()
.save()
end with
set tclass=nothing
end function
dim templatefilepath
templatefilepath=server.mappath("../../../default.htm")
dim tclass,strhtml
set tclass=new tkl_templateclass
strhtml=""
dim rs,sql
sql="select top 8 title,filepath,addtime from view_newsinfo where instr(','+speciality+',',',18,')<>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
strhtml=strhtml&"·[" & strclass.formatmydate(rs("addtime"),"{m}/{d}") & "]<a href=""" & rs("filepath") & """ target=""_blank"">" & rs("title") & "</a><br>" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
with tclass
.opentemplate(templatefilepath)
.startelement="<!--downrecommand:start-->"
.endelement="<!--downrecommand:end-->"
.value=strhtml
.replacetemplate()
.save()
end with
set tclass=nothing
end function
如果这段使用在sql中会提示'instr' 不是可以识别的 函数名。
sql数据库更新应用:
dbo.isspeciality(speciality,'2')>0
完整代码如下:
复制代码 代码如下:
'//下载中心 - 推荐
function update08()
dim templatefilepath
templatefilepath=server.mappath("../../../default.htm")
dim tclass,strhtml
set tclass=new tkl_templateclass
strhtml=""
dim rs,sql
sql="select top 8 title,filepath,addtime from view_newsinfo where dbo.isspeciality(speciality,'18')>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
strhtml=strhtml&"·[" & strclass.formatmydate(rs("addtime"),"{m}/{d}") & "]<a href=""" & rs("filepath") & """ target=""_blank"">" & rs("title") & "</a><br>" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
with tclass
.opentemplate(templatefilepath)
.startelement="<!--downrecommand:start-->"
.endelement="<!--downrecommand:end-->"
.value=strhtml
.replacetemplate()
.save()
end with
set tclass=nothing
end function
function update08()
dim templatefilepath
templatefilepath=server.mappath("../../../default.htm")
dim tclass,strhtml
set tclass=new tkl_templateclass
strhtml=""
dim rs,sql
sql="select top 8 title,filepath,addtime from view_newsinfo where dbo.isspeciality(speciality,'18')>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
strhtml=strhtml&"·[" & strclass.formatmydate(rs("addtime"),"{m}/{d}") & "]<a href=""" & rs("filepath") & """ target=""_blank"">" & rs("title") & "</a><br>" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
with tclass
.opentemplate(templatefilepath)
.startelement="<!--downrecommand:start-->"
.endelement="<!--downrecommand:end-->"
.value=strhtml
.replacetemplate()
.save()
end with
set tclass=nothing
end function
上一篇: 如何使用Administrators组用户运行ASP程序
下一篇: 三种常见的国内电子商务经营方式