DATA FILTER AND LOGICAL OPERATORS

QuestionsDATA FILTER AND LOGICAL OPERATORS
Giovanni Luca Bonelli asked 8 years ago

Hi Abu,
I have a problem while filtering or search data when I use logical operator (OR) in sql select_command.

If I write:
$g->select_command = "SELECT * FROM odldiceocc WHERE dlrl='DL/RL' OR cse='CSE'";

The table is correctly populated but autofilter or search button show random, wrong value.

If I write:
$g->select_command = "SELECT * FROM odldiceocc WHERE dlrl='DL/RL'";

autofilter or search button show correct value

How do you think about?

Thankyou in advance

2 Answers
Abu Ghufran answered 8 years ago

You can try putting ( ) around condition.
e.g.
$g->select_command = "SELECT * FROM odldiceocc WHERE (dlrl='DL/RL' OR cse='CSE')";

Luca answered 8 years ago

As always,
It works!

Thanks

Your Answer

6 + 2 =

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?