phpMyAdmin stores the order of each table per user. So when the user browses a table, the sort order is used from user preferences.
The problem here is that the initial query does not reflect the search order.
table
".col
. the query shown will be "SELECT * FROM table
ORDER BY table
.col
ASC".I expect the GUI and the result set to be syncronised, regarding shown query and record order, even initially.
Hi Alexander,
I was able to reproduce your problem. I will try to fix it
Hi,
I think there is another bug due to not synchronizing.
is sorted in DESC order.
I made some changes and sent a pull request. With these changes now ordered table and the query are synchronized and displayed only if the user browses tables through navigation tree. Otherwise the order is remembered, but not displayed.
https://github.com/phpmyadmin/phpmyadmin/pull/872
Fixed with https://github.com/phpmyadmin/phpmyadmin/commit/e8fa9e533565eb2503586ce7040236a928a50de2
Previous fix reverted; new fix applied:
https://github.com/phpmyadmin/phpmyadmin/commit/212a7e5a7e249f18c6c4daa56be801edc176d789
I think this bug was not 100% resolved with the new fix.
1.Browse a table. The query shown will be "SELECT * FROM table".
2.Sort by a column so that sorting becomes "DESC".
3.Now go to "SQL" tab, write a query for the table that starts with "SELECT * FROM [tabel name]" without adding any "order by" field, click on "go" button.
4.Now the table is still sorted in "DESC" order. But it should not be ordered (at least it should be sorted in "ASC" order").
@Sampath: Thank you for pointing this out. I've written to dev mailing list to get an opinion on the expected behavior of this case. Let's see what others think.