前台的置顶SQL语句:
string sql = "select top " + count + " * from NewInf where ID <> -1 and zdnum=(select max(zdnum) from NewInf where ID <> -1" + str + " ) order by ID desc "

底层的置顶SQL语句
                if (num1 == "0")
                {
                    sql.Add("update ProcessInf set hotinf = " + num1 + " where ID = '" + list[i].ToString() + "' ");
                }
                else
                {
                    sql.Add("update ProcessInf set hotinf = (select Max(hotinf) from ProcessInf)+1 where ID = '" +
                            list[i].ToString() + "' ");
                    //sql.Add("update ProcessInf set hotinf = '"+num1+"' where ID = '"+list[i].ToString()+"' ");
                }

posted on 2007-11-22 20:36  小角色  阅读(506)  评论(0)    收藏  举报