table doesn't refresh when using OR_WHERE
table doesn't refresh when using OR_WHERE
Hello,
When I use the OR_WHERE function, my table doesn't refresh once an update is made. The data get updated correctly but it just doesn't show the new updated values unless the page is manually refreshed. When I replace to just WHERE function, then the table would reload just fine. I'm not sure what might have gone wrong.
Refresh normally after update:
->where( 'facility.Client', 'CSSA')
Does not refresh automatically:
->where( function ( $r ) {
$r->where( 'facility.Client', 'CSSA')
->or_where( 'facility.Client', 'CPS')
->or_where( 'facility.Client', 'CSSA-T')
->or_where( 'facility.Client', 'CPS-T');
} )
This question has an accepted answers - jump to answer
Answers
Could you try this please:
That inner
where()
call will cause our libraries to use nesting parenthesis which I think should address this issue.Allan
Thanks a lot Allan. It works and refreshes properly now.