I fetch an array with todo titles and due dates from MySQL. I want to order it by date and have the oldest on top. But there are some todos without a date. These todos I don\'t
You can use this:
select * from my_table order by if(isnull(my_field),1,0),my_field;