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% of the time I would rather have the newest data (my test data) shown at the top by default rather than the useless first few records ever saved.
Is there a way to configure PHPMyAdmin to show the newest records by default? To alter similar behavior?
In phpMyAdmin go to table structure. On bottom you can press option "Move columns" There you can rearange tables as you see fit. That one is for rearranging columns, not the tables themselves.
The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.
For anyone else who comes here looking for an answer:
In phpMyAdmin 4.5.0, maybe in earlier versions too, you can set the $cfg['TablePrimaryKeyOrder'] config like so:
$cfg['TablePrimaryKeyOrder'] = '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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With