SEARCH_JSON OR option

QuestionsSEARCH_JSON OR option
David Gilmore asked 4 years ago

Greetings! I am using this construct:
"groupOp":"OR"
but when the query is generated it still contains an AND not an OR.

Example from this https://phpgrid.desk.com/customer/portal/questions/1126469-is-it-possible-to-filter-phpgrid-data-with-more-than-one-field-search-json- post:
"groupOp":"OR",
"rules":[
{"field":"mk_id","op":"ne","data":"102"},
{"field":"mk_id","op":"eq","data":"A"}

1 Answers
Abu Ghufran answered 4 years ago

Hi,

I tested OR operator and i works as expected in demos/search/search-onload.php
You can try replacing it in demo like:

$sarr = <<< SEARCH_JSON
{
"groupOp":"OR",
"rules":[
{"field":"name","op":"cn","data":"{$v}"},
{"field":"closed","op":"eq","data":"No"}
]
}
SEARCH_JSON;

Let me know if still need help. You might need to send grid code for review at my email: [email protected]

Your Answer

2 + 6 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?