How can I set a default sort for tables in PHPMyAdmin (i.e. always “Primary key - Descending”)

后端 未结 7 1030
情书的邮戳
情书的邮戳 2020-12-11 01:19

Even though its obnoxious in a lot of ways I use PHPMyAdmin all the time to debug database issues while writing PHP. By default it sorts tables by primary key ascending. 99%

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-11 01:39

    By default it sorts tables by primary key ascending

    phpMyAdmin isn't performing any sorting at all by default. It's simply asking for all records in a table and MySQL is deciding the order.

    Is there a way to configure PHPMyAdmin to show the newest records by default? To alter similar behavior?

    There's no way to do this as phpMyAdmin would have to be informed about every primary key of every table (assuming there is one, and only one) and how to sort it.

    phpMyAdmin does support bookmarking queries. You could DESC and then bookmark that. However, it certainly won't minimize the number of clicks, if that's what you're aim is.

    http://www.phpmyadmin.net/documentation/

提交回复
热议问题