How can I filter the dates that it would sort first by today then normal?
I have a column with data type datetime, I wanted my results to be sorted showing today's date first and continue normal sorting.
How can I filter the dates that it would sort first by today then normal?
I have a column with data type datetime, I wanted my results to be sorted showing today's date first and continue normal sorting.
What about
SELECT
...
FROM
...
ORDER BY IF(DATE(datefield=CURRENT_DATE()),0,1), datefield DESC
Edit
Added the DESC
to the ORDER BY
after the 3rd comment to the OQ