Editor PHP Library query with nullable fields problem
Editor PHP Library query with nullable fields problem
Hello everyone,
This is my first time here so I hope i'll follow the rules.
When using datatables with ajax request and editor library (php in this case) on the backend, the editor lib. is filtering out every row that has a NULL value in some column.
I've read editor's code and I've found out that the library creates the where condition with $value LIKE '%%' (from datatables JS filter) and so every NULL value is filtered out (row 1055, Query.php).
I've solved this by adding IFNULL($value, '') to the code.
Could you tell me if this may be a valid solution?
Hope this will help you.
Thanks
Answers
Editor shouldn't be doing that. The code for Editor has it creating a
LIKE %...%
filter only if there is actually a value. It should never be%%
.Can you show me your Javascript and PHP code please? Also, what version are you using?
Thanks,
Allan
Sure
This is JS Code https://pastebin.com/sU16YVWq
This is PHP Code https://pastebin.com/M6AaJREB
I'm using Laravel but i don't think it's a problem.
Thanks