4
I want to sort the results by days of the week
I have 7 events, 1 event for each day, and have to order in the following way:
Sunday, Monday, Tuesday, fourth, Thursday, Friday, Saturday
Assuming today is Wednesday he will have to show all the data in this order:
Fourth, Thursday, Friday, Saturday, Sunday, Monday, Tuesday.
Query:
$sqlCmd2 = "SELECT * FROM account.events ORDER BY FIELD(day, 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday') ASC LIMIT 3";
Is functional.
UNION is to merge one query into the other? I need something like this. See question at this link: http://answall.com/questions/94057/uma-query-para-somar-os-values-e-selecionar-todos-campos-de-acordo-a-cl%C3%a1usul
– André Nascimento