P> 我要獲取日志表的內容,條件是根據(jù)標簽來獲取,不知道怎么寫了.請幫忙</P> <P> 表一: [blog_Content] 日志表: </P> <P>字段:blog_id ,cate_Id,blog_Title,blog_Entry,blog_Content,blog_Tbs 等</P> <P> 表二: [blog_tag] 標簽表:</P> <P>字段:tag_Id,tag_Label,tag_Used</P> <P> 表三: [blog_Blogtag] 關聯(lián)表:</P> <P>字段:seq_Id,blog_Id,tag_Id</P> <P> 比如.我根據(jù)分類來獲取日志列表就是這樣寫: 因為在一個表中</P> <P> "select * from blog_Content where <A href="mailto:cate_id=@CataID">cate_id=@CataID</A> ";</P> <P> </P>問題補充: /// <summary> /// 獲取文章列表 根據(jù)分類 /// </summary> /// <param name="CreateUser"></param> /// <returns></returns> public override IList<Content> GetTopContent(int CatId) { string strGetTopContent = "SELECT * FROM blog_Content where Cat_id=@CatId"; IDataReader dr = SQLiteHelper.ExecuteReader(strGetTopContent, null); IList<Content> list = new List<Content>(); while (dr.Read()) { list.Add(Model(dr)); } dr.Close(); return list; }
數(shù)據(jù)庫問題
瀟瀟雨雨
2018-12-03 14:08:11