string departid = Session["depart"].ToString();
departid = departid.Remove(departid.Length - 1, 1);
string sql = "select * from depart_table where id in('" + departid + "')";
id为INT型,这怎么弄- -
------解决方案--------------------------------------------------------
id in(" + departid + ")"
---------->
id in(1,2,3,4,5)
------解决方案--------------------------------------------------------
slect * from xxx where id in (1,2,3,4,5),数字不加引号
------解决方案--------------------------------------------------------
id in(" + departid + ")