求助,关于sql带入参数的写法问题。
string sql = "SELECT ID,n_title,shijian FROM [news_contents] WHERE typeid =" + type ;
我想在这一句里面加一个关于ID的降序排列,麻烦各位朋友看看怎么写,谢谢。
------解决方案--------------------string sql = "SELECT ID,n_title,shijian FROM [news_contents] WHERE typeid =" + type + " order by Id desc" ;
------解决方案--------------------string sql = "SELECT ID,n_title,shijian FROM [news_contents] WHERE typeid =" + type + " order by id desc";