By kilsbo on
I am using the Views module of version 6.x-2.5.
I have recently started working on this intranet site which has been running for some time. I got a request on altering a sort order and I went to that view and changed the fields and criterias.
However, nothing is changing no matter what sort criterias I configure. The SQL statement looks exactly the same. If I change something else I get a different outcome so I know for sure I am on the correct view.
I am unsure but could there be a way to override this sort mechanism and if so, where do I look for such an override?
Comments
_
If you change the fields and sorting criteria of Views you are not changing the MySQL db. You are only changing the output of the view.
If you change the sort order in Views you should get a different output - make sure the sort order you change is the default in the table view. Make also shure that you are doing the changes on the page of the view not in the default.
The page (or block) may have been set to override the default - you will see that at the top of the editing page of the field you are editing under views.
Just to test this you could create a fresh view of what you want to do. If you work on someone else's view and have just started to work with Drupal and/or Views there are plenty of things to check and with a fresh start you could learn this quite quickly.
I hope I understood your query correctly. Good luck ...
Some views can be sorted in multiple ways.
I have experienced something similar, although I am not sure if your cause is the same as mine.
In views, there is the "Sort criteria" parameter on the main view. However, if you display a table "Style" under "Basic Settings", you can specify sorting for the table. (Click the gear icon after the "Style: table" setting. It will show you a sub-form with a table for the column properties, including whether the column is sortable, and whether it is the default sort).
I think it works this way: The sort criteria sets the sort-clause in the database query and therefore determines in what order the results are returned by the database. However, some formatting options apply to some output styles. In the case of the table style, the renderer takes the results from the output and, again, adds sorting functionality. In case of the table, this allows you as a user to click on the column header to change the sort order. In that case the "sort criteria" are simply ignored (or actually, the results are resorted).
Mark
Thanks for your explaination,
Thanks for your explanation, groenm. This is the exact issue I was having!