且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在PHPMyAdmin中为表格设置默认排序(即始终为“主键-降序")

更新时间:2023-11-24 14:06:34

对于任何其他来这里寻找答案的人:

For anyone else who comes here looking for an answer:

在phpMyAdmin 4.5.0中,也许在早期版本中,也可以设置 $ cfg ['TablePrimaryKeyOrder'] 配置如下:

In phpMyAdmin 4.5.0, maybe in earlier versions too, you can set the $cfg['TablePrimaryKeyOrder'] config like so:

$cfg['TablePrimaryKeyOrder'] = 'DESC';

当没有外部定义的排序顺序时,这定义了具有主键的表的默认排序顺序.可接受的值:['NONE','ASC','DESC']

This defines the default sort order for the tables, having a primary key, when there is no sort order defines externally. Acceptable values : [‘NONE’, ‘ASC’, ‘DESC’]

如果表具有主键并且未对其应用任何其他排序,则此设置为默认排序.

This sets the default sort if the table has a primary key and that no other sort has been applied to it.