I have 2 columns to ORDER BY
-- date
, day
..
+------------------+---------------------+
| day_to_send | date_to_send |
+------------------+---------------------+
| 25 | 0000:00:00 00:00:00 |
| 18 | 0000:00:00 00:00:00 |
| 11 | 0000:00:00 00:00:00 |
| NULL | 2018-11-20 04:41:12 |
| NULL | 2019-04-11 10:50:12 |
| NULL | 2018-11-19 11:30:12 |
+------------------+---------------------+
Output should be
1. 2018-11-19 11:30:12
2. 2018-11-20 04:41:12
3. 2019-04-11 10:50:12
4. 11
5. 18
6. 25
I have tried so far, date ASC/DESC
, and day ASC/DESC
but i couldn't achieve this somehow.. any help would be highly appreciated.
->orderBy('date_to_send', 'ASC')
->orderBy('day_to_send', 'ASC')
I am using Laravel 4
MY OUTPUT, What I am getting