title: How can i get AND clause in parse ios
body: <p>i am using this <a href="https://parse.com/docs/ios_guide#queries-compound/iOS" rel="nofollow">link</a> as a guide, but i can figure out how can i use AND clause for parse. It only defines OR clause in sample code.</p>
  
  <p>if i were to convert it from SQL statement, it looks like this...</p>
  
  <pre><code>SELECT * FROM RemittanceTable WHERE beneCode = 'code' AND remittanceAmount = 500.00
  </code></pre>
  
  <p>For example in this code, i want to check if the code AND amount if correct before reading the data. But it validates with OR clause</p>
  
  <pre><code>PFQuery *beneCodeQuery = [PFQuery queryWithClassName:@"RemittanceTable"];
  [beneCodeQuery whereKey:@"beneCode" containsString:_beneCodeText.text];
  
  PFQuery *amountQuery = [PFQuery queryWithClassName:@"RemittanceTable"];
  [amountQuery whereKey:@"remittanceAmount" equalTo:amount];
  
  PFQuery *query = [PFQuery orQueryWithSubqueries:[NSArray arrayWithObjects:beneCodeQuery,amountQuery,nil]];
  [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
      if (!error) {
          for (PFObject *object in objects) {
              NSLog(@"%@", object);
  
              [self resignAllResponder];
              _paymentDetailsImage.frame = CGRectMake(_paymentDetailsImage.frame.origin.x, _paymentDetailsImage.frame.origin.y, _paymentDetailsImage.frame.size.width, paymentModeOrigHeight);
              _detailsView.alpha = 1;
  
          }
      }}}];
  </code></pre>