I have seen that when making a query in phpmyadmin it is ordered by default, the queries are sorted by default in some way, or do you always have to perform an ORDER BY?
I have seen that when making a query in phpmyadmin it is ordered by default, the queries are sorted by default in some way, or do you always have to perform an ORDER BY?
Nope.
Database engines do not order the responses to queries in any way, but instead return records as they are processed (and this also depends on the engine).
No database ensures that what is fetched will be sorted, unless you add a clause
order by
to your select.What's more, no database ensures that before the same query, the order in which it will bring the records is the same (although it generally is, it is not guaranteed anywhere).
If phpmyadmin commands any output, it may be standard behavior of the display tool (phpmyadmin is not a database engine).
So if you want to ensure an output that is always the same, you have to use
order by