我從兩個表中選擇數據在正常情況下,它工作正常,但如果我使用where子句它不會返回任何東西。如何從iPhone中的數據從sqlite表中使用在哪裏Cluase我
這裏是查詢
NSString *select =[NSString stringWithFormat:@"SELECT *from ContentMaster As ml LEFT JOIN ContentTagging As cat ON cat.ContentID = ml.ContentID where cat.ContenTagText= %@" , appDelegate.tagInput];
這裏是查詢的NSLog
SELECT *from ContentMaster As ml LEFT JOIN ContentTagging ON cat.ContentID = ml.ContentID where cat.ContenTagText= Tag1
你在sqllite中執行此查詢嗎?它有什麼價值?如果是,則檢查appDelegate.tagInput是否有一些值。打印選擇查詢,並檢查它的糾正 – KDeogharkar
是的,我打印appDelegate.tagInput它有價值和QUERY結果也顯示這裏是結果SELECT * from ContentMaster作爲ml LEFT JOIN ContentTagging ON cat.ContentID = ml.ContentID在哪裏貓.ContenTagText = Tag1 –