I’m creating a PHP script that fetches IDs from a database. The results are sorted by two datetime values, createdon and publishon.
The priority of publishon is higher than createdon; however, publishon may also be NULL. publishon = null => sort by createdon.
Can someone help me sort those rows?
1 Answer