Multiple OR in where clause breaks filter/search
Multiple OR in where clause breaks filter/search
janpan
Posts: 19Questions: 4Answers: 0
Hi,
I am using server side processing and everything works 100%.
However, when I have multiple OR statements in my where clause, the filter/search functionality stops working i.e. does not filter on any column.
Without the OR statements in my Where clause, it filters fine.
Any ideas ?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Code sample please.
As requested, here is the code. Just again to explain, filtering works 100% for all user type e.g. Submitter, however, not for the line manager (see server side script where I have multiple OR statments in where clause)
My datatables initialisation:
My server side script (view_Submissions_remote.php):
bump, any ideas ?
I would suggest modifying the SSP class to echo out the SQL query it generates. That should give a clue as to why it isn't working. It might be that you just need to add
()
around the clause.Allan
Thanks Allan, I'll give it a try.
Wow ! That was it, thanks @allan !