guoqing718 - 2010/12/8 20:14:00
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
guoqing718 - 2010/12/12 0:54:00