Searching is not functional

QuestionsSearching is not functional
Man Lam asked 5 years ago

the searching function don't work when i am using the following query:

$g->select_command = "select full_name, out_datetime, in_datetime, back_to_office, nature, location from mm_outdoor where (in_datetime is not null and back_to_office = 'YES') or (in_datetime is null and back_to_office = 'NO')";

but it's ok when the query is
$g->select_command = "select full_name, out_datetime, in_datetime, back_to_office, nature, location from mm_outdoor";

not support where clause?

1 Answers
Abu Ghufran answered 5 years ago

Try using extra paranthesis around where clause. The auto filter / search dialog will AND the conditions in where clause.
where ( (….) or (…) )

$g->select_command = "select full_name, out_datetime, in_datetime, back_to_office, nature, location from mm_outdoor where ( (in_datetime is not null and back_to_office = 'YES') or (in_datetime is null and back_to_office = 'NO') )";

Your Answer

17 + 13 =

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?