What are potential pitfalls to be aware of when using DESC LIMIT in PHP database queries?

When using DESC LIMIT in PHP database queries, be aware that the ordering of results may not be accurate if the data is not sorted properly. To ensure correct ordering, always include an ORDER BY clause in your query when using DESC LIMIT.

$query = "SELECT * FROM table_name ORDER BY column_name DESC LIMIT 10";
$result = mysqli_query($connection, $query);

// Process the results