Quickbase php api - how to group multiple conditions in do query

  • 0
  • 1
  • Question
  • Updated 5 months ago
I need to query 2 multi select fields -
same field  should be OR condition and the other field should be in AND condition

As of now, it's working like 
(fid1 = value1 OR fid1 = value2 AND fid2 = value3 OR fid2 = value4)

I would like the query like
(fid1 = value1 OR fid1 = value2) AND (fid2 = value3 OR fid2 = value4)

array(0) {
    ["fid"]=>
    int(7)
    ["ev"]=>
    string(2) "EX"
    ["cri"]=>
    string(16) "Field Operations"
  }
  [2]=>
  array(1) {
    ["fid"]=>
    int(7)
    ["ev"]=>
    string(2) "EX"
    ["cri"]=>
    string(7) "Finance"
    ["ao"]=>
    string(2) "OR"
  }
  [3]=>
  array(2) {
    ["fid"]=>
    int(7)
    ["ev"]=>
    string(2) "EX"
    ["cri"]=>
    string(17) "Global Operations"
    ["ao"]=>
    string(2) "OR"
  }
  [4]=>
  array(3) {
    ["fid"]=>
    int(7)
    ["ev"]=>
    string(2) "EX"
    ["cri"]=>
    string(30) "Human Resources/Communications"
    ["ao"]=>
    string(2) "OR"
  }
Photo of Avinash Hiremath

Avinash Hiremath

  • 112 Points 100 badge 2x thumb

Posted 5 months ago

  • 0
  • 1

Be the first to post a reply!