同时执行多条SQL语句
public int U_AppUser_Price(int id, decimal tg_price)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("update dt_article set click=click-1 where id=" + id);
strSql.AppendFormat(";update a set a.amount=a.amount-{0} from dt_appusers a join dt_article b on a.id=b.user_id where b.id={1}",tg_price,id);//注意加分号和占位符
return DbHelperSQL.ExecuteSql(strSql.ToString());
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。