这是DAL中的sql语句
public int GetInfos(int itemid)
{
string sql = String.Format("select sum(qty) q from jy_farm_nurture j
where animal_type in (select {0} from base_dict b)
group by j.animal_type ", itemid);
在这后面应该怎么直接返回一个sum(qty)啊?
}
------解决方案--------------------------------------------------------
dr.read()
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------
LINQ to SQL!