我有超過3個視圖。我的數據庫看起來是這樣的:iOS上的多個SQLite查詢
Category:
CatID | CatTitle
----------------
1 | XYZ
2 | Sample
Content:
ItemID | ItemCatID | ItemText | ItemText2 | ItemText3 | ItemText4
-----------------------------------------------------------------
1 | 1 | Test | Bla | Sample | MoreContent
2 | 1 | Test2 | BlaBla | Sample2 | Other Content
3 | 2 | Test3 | BlaBla2 | Sample3 | Other Content2
我希望有一個圖,其中第一頁類,第二頁表(ItemText),第三頁的細節。
我不知道如何去做到這一點。如果我使用JOIN,我應該在三重定義「sqlite3_stmt * compiledStatement」?
我認爲可以用'For','get parent,child'來完成(像java中的遊標)?
歡迎任何建議。