0
我被困在試圖查詢類「帖子」中的所有行,首先屬於當前用戶,然後在同一列中輸入「魚」班級「職位」。解析服務器查詢以查找用戶名下的關鍵字
我能順利拿到屬於當前用戶的所有帖子:
let posts = PFQuery(className: "posts")
posts.whereKey("username", equalTo: PFUser.currentUser()!.username!)
posts.countObjectsInBackgroundWithBlock ({ (count:Int32, error:NSError?) in
if error == nil {
header.posts.text = "\(count)"
}
我已經試過只需添加另一個whereKey第一下whereKey使用
posts.whereKey("fish", equalTo: "fish")
但這並沒有工作。關於我需要做什麼來完成此任何想法?