I am using parse in my app and I want to satisfy the two query and return object without using orQueryWithSubqueries. Here my query to parse code:
func queryToParse(){
var queryForBlood = PFQuery(className: "Donors")
queryForBlood.whereKey("BloodGroup", equalTo: bloodGroupTextField.text)
var queryForCity = PFQuery(className: "Donors")
queryForCity.whereKey("City", equalTo: citySearchTextField.text)
var query = PFQuery.orQueryWithSubqueries([queryForCity,])
query.findObjectsInBackgroundWithBlock { (objects, error) -> Void in
if error == nil {
self.tableData = objects as NSArray
println(self.tableData)
self.tableView.reloadData()
}
else
{
println(error)
}
}
}
whereKeytwice on the same query with the two different criteria