1
I’m assembling type a CRM, where makes queries in MYSQL with PHP to bring the appointments I have today, this week and all others.
I wish you’d bring something like that:
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
It has to bring everything in the same consultation, or I have to separate in 3 consultations (Today’s consultation, this week’s consultation and all other)
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>';
}
Dear Leonardo, do not put the code of an answer in the question, we are QUESTIONS and ANSWERS, if you still have any problem with the code of any question comment to who answered, if you edit adding the code in the question will seem that his answer has no sense at all.
– Guilherme Nascimento