Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sorting of pfquery with multiple conditions for iOS7

i am trying to sort a pfquery with multiple conditions, the code below sorts only one column. please help.

- (PFQuery *)queryForTable
{
    PFQuery *query = [PFQuery queryWithClassName:self.parseClassName];
    [query whereKey:@"mStatus" equalTo:@"running"];
    [query orderByAscending:@"mName"];
    [query orderByAscending:@"mOrder"];
    return query;
}
like image 737
mugunthan Avatar asked Jan 13 '14 04:01

mugunthan


Video Answer


1 Answers

- (PFQuery *)queryForTable {
    PFQuery *query = [PFQuery queryWithClassName:self.parseClassName];
    [query whereKey:@"mStatus" equalTo:@"running"];
    [query orderByAscending:@"mName"];
    [query addAscendingOrder:@"mOrder"];
    return query;
}
like image 177
jonahb Avatar answered Nov 11 '22 07:11

jonahb