SELECT *
FROM `products`
JOIN (
SELECT MAX(`discount_price`) AS `max_price`, `product_id`
FROM `options`
GROUP BY `product_id`
) AS `max` ON `max`.`product_id` = `products`.`id`
ORDER BY `max`.`max_price` ASC
LIMIT 24
Traditionally, and according to ECMAScript, all primitives and objects are loosely unequal to undefined and null
uasort($ar, static fn($a, $b) : int => $a[0] - $b[0]);
On Windows the default value is 1. On macOS, the default value is 2. On Linux, a value of 2 is not supported; the server forces the value to 0 instead.
You should not set lower_case_table_names to 0 if you are running MySQL on a system where the data directory resides on a case-insensitive file system (such as on Windows or macOS).
It is prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized.