Hello, Abu Gufran!
When using dropdown dependent with 'or' statement in sql query, i do not get the required (filtered) records. Can you fix it? If I will remove 'or' statement in sql query, everything is ok!
Hi,
Azam, can you send me sample code snippet. Currently i am facing problem in regenerating this case.
Hi, Abu Gufran!
If you will change (for example) in your demo code for dropdown dependent query to:
$g->select_command = "SELECT id, invdate, invheader.client_id, amount, note FROM invheader
INNER JOIN clients on clients.client_id = invheader.client_id where amount=1000 or amount<500
";
you will see that it will work incorrect. The 'or' statement in that query causes abnormal result. Thank in advance!
Change following …
where amount=1000 or amount<500
to
where (amount=1000 or amount<500)
By this, it will not interfere with the search where clause additions.
$g->select_command = "SELECT id, invdate, invheader.client_id, amount, note FROM invheader
INNER JOIN clients on clients.client_id = invheader.client_id where (amount=1000 or amount<500)
";