I'm setting up a CRM type, where it does the queries in MYSQL with PHP to bring the appointments I have today, this week and all others.
I'd like you to bring something like this:
Hoje:
compromisso A
compromisso B
Essa semana:
compromisso C
Todos
compromisso D
compromisso E
The table in MYSQL looks like this:
compromissos
id|datacompromisso |compromisso
1 |2018-07-30 10:00:00|compromisso A
2 |2018-07-30 10:00:00|compromisso B
3 |2018-07-31 10:00:00|compromisso C
4 |2018-08-10 10:00:00|compromisso D
5 |2018-09-20 10:00:00|compromisso E
You can bring everything in the same query, or I have to separate it into 3 queries (Today's query, this week's query, and everything else)
The results in PHP look like this:
foreach($results as $r){
echo '<tr>';
echo '<td>'.$r->datacompromisso.'</td>';
echo '<td>'.$r->compromisso.'</td>';
echo '<td>'.$r->grupo.'</td>';
echo '</tr>';
}