Use:
SELECT field_name
FROM table_name
ORDER BY id DESC
By default, MySQL will show results in ascending order. If you want to show them in reverse order, use ORDER BY field_name DESC
.
You can use id or date as the field name.
More Related Contents:
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `id` [closed]
- Using PHP data in MySQL [closed]
- Checking the availability of rooms
- How to properly set up a PDO connection
- Commands out of sync; you can’t run this command now
- SELECT COUNT(*) AS count – How to use this count
- Get table column names in MySQL?
- How to resolve ambiguous column names when retrieving results?
- Loading .sql files from within PHP
- selecting unique values from a column
- Use bound parameter multiple times
- MySQL “NOT IN” query 3 tables
- Create a dynamic mysql query using php variables
- PHP: multiple SQL queries in one mysql_query statement
- How to separate DATE and TIME from DATETIME in MySQL?
- Why does this return Resource id #2? [duplicate]
- MySQL skipping first row
- Fatal error: Uncaught exception ‘mysqli_sql_exception’ with message ‘No index used in query/prepared statement’
- How to generate unique id in MySQL?
- Simple PHP SQL login troubleshooting
- MySql PHP select count of distinct values from comma separated data (tags)
- How to SELECT DEFAULT value of a field
- How to check if a value already exists to avoid duplicates?
- how do I get month from date in mysql
- php/mysql zip code proximity search
- Updating column so that it contains the row position
- MYSQL select a piece of a string and order by that piece
- Aggregated query without GROUP BY
- PHP/MySQL Pagination
- Limit pagination page number