前台的置顶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()+"' ");
}
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()+"' ");
}
浙公网安备 33010602011771号