Skip to content
Advertisement

CakePHP LEFT JOIN sorting issue

I’m using cakePhp 2.x version and following is my view and controller for a datagrid, I want Area and Boxes both to be sorted by user. Box can be sorted, but Area first sorting is working, after that when click on sorting, page is refreshed but it doesn’t sort. What could be the reason?

JavaScript
JavaScript

Advertisement

Answer

Final solution was, change the Model based on the submitted sorting column,

JavaScript

Then change the JOIN query and $data = $this->paginate('B');

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement