I have a Parse class with the name "Question", and a column called "quizid" of type Number.
In xcode swift class, I have a variable of type Int quiz_id.
I have a class inherited from PFQueryTableViewController
I want to pull data from the class "Question" based on where condition that column "quizid" value is equal to, quiz_id integer variable.
Here is the code I am using, but It gives runtime exception.
Could you tell me the right code for query?
whereKey while using Int variable in swift
override func queryForTable() -> PFQuery{
let query = PFQuery(className: "Question")
query.whereKey("quizid", equalTo:PFObject(withoutDataWithObjectId:self.quiz_id! as! String))
query.cachePolicy = .CacheThenNetwork
query.orderByAscending("createdAt")
return query
}