产品使用及交流论坛

首页 » 产品使用交流区 » 安装及使用交流 » SQL版本pageadmin 新文章加new图标【SQL2005测试完好】
guoqing718 - 2010/12/8 20:14:00
里面修改了 参数和 引用  演示网站:http://www.nbs-sosn.cn

其他的见
http://bbs.pageadmin.net/showtopic-7016.aspx
帖子13楼
guoqing718 - 2010/12/9 12:21:00
根据老师兄的发的access的数据灵感  我终于弄好了SQL版本的
数据参数是:

<% @ Import  NameSpace="PageAdmin"%>
<% @ Import  NameSpace="System.Data"%>
<% @ Import  NameSpace="System.Data.OleDb"%>
<% Response.Buffer=true; %>

<%      
        Conn myconn ;
        OleDbConnection myOleDb ;
        OleDbCommand comm;
        string conPath,sql;

              myconn=new Conn();
        conPath=myconn.Constr();

        myOleDb=new OleDbConnection(conPath);
        myOleDb.Open();

        sql="UPDATE [information] SET  [title_style] ='' where [title_style] NOT LIKE '%color:%' or  [title_style] is null";
        comm=new OleDbCommand(sql,myOleDb);
        comm.ExecuteNonQuery();

        sql="UPDATE [information] SET  [title_style] = 'background:url(/images/new.gif) no-repeat 100% 0px ; padding: 1px 33px 0px 0px;' WHERE [title_style] NOT LIKE '%color:%' AND [thedate] BETWEEN DateAdd(d, -7, getdate()) AND getdate()";//替换new图标位置,new图标保留几天,改-7这个数字
        comm=new OleDbCommand(sql,myOleDb);
        comm.ExecuteNonQuery();

        myconn=null;
        comm=null;
        myOleDb.Close();
        myOleDb=null;
%>
paullee - 2010/12/9 12:46:00
无效!
gearfox - 2010/12/9 13:32:00
三楼你测试了?????钛合金
paullee - 2010/12/10 14:13:00
测了啊,按原文复制上去的,图片位置也存在,去掉了"//替换new图标位置,new图标保留几天,改-7这个数字"而已
1994

1992

1993
guoqing718 - 2010/12/12 0:54:00
http://www.nbs-sosn.cn
1
查看完整版本: SQL版本pageadmin 新文章加new图标【SQL2005测试完好】