Nested AND and OR expressions in Editor PHP libraries
Nested AND and OR expressions in Editor PHP libraries
Hello,
I studied https://editor.datatables.net/manual/php/conditions , but I could not find how to express an sql query like in the following snippet:
... WHERE age > 18 AND ( name = 'Allan' OR name = 'Peter' ) AND location = 'Edinburgh'
using the Editor PHP libraries. Could you please help me.
Thanks,
Eberhard
This discussion has been closed.
Answers
Look at "Multiple conditions" and "Simple OR condition" here:
https://editor.datatables.net/manual/php/conditions#Or-operators-and-grouping
Thank you. Following your comment I would suggest
But this doesn't seem to work.
Thanks,
Eberhard
For those who might be interested: I finally found a solution. In fact my values are not static but stored in variables. So I have to use "use" for the global variables: