Tone with a Problem here that I do not know how to solve. I did an Agenda that returns me the users and the calls that it would have in the week, this presented in a table equal to a weekly calendar. I will put a picture to better understand how it is today and what I want to change. IwantedalltheschedulesofthisUserinthesamelineandinthehouseofthedayscorrero
<tableclass="table table-bordered table-striped table-white">
<thead>
<tr>
<th >Usuario</th>
<th >Segunda</th>
<th >Terça</th>
<th >Quarta</th>
<th >Quinta</th>
<th >Sexta</th>
<th >Sabado</th>
<th >Domingo</th>
</tr>
</thead>
<?
$sql ="SELECT * FROM os where status2 <> 'Fechado' AND start1
BETWEEN '$dataRecebida' AND '$proximaData' ";
$resultado = mysql_query($sql) or die( mysql_error());
while ($linha = mysql_fetch_assoc($resultado)) {
$id1 = $linha["id1"];
$nome = $linha["nome_cliente"];
$nome_tec = $linha["nome_tec"];
$tecnico = $linha["nome_tecnico1"];
$start1 = $linha["start1"];
$d1 = substr($start1, 0, 10 );
$t = ' ';
$d2 = substr($start1, 11, 5 );
$start = $d1.$d2;
$data1 = implode("/",array_reverse(explode("-",$d1)));
$datal = $data1.$t.$d2;
$dia = DateTime::createFromFormat('Y-m-d H:i:s', $start1);
$dia = $dia->format('D');
if($dia === 'Mon'){
$data2 = "<span class='label label-danger'>$id1</span> $datal<br>
</strong>$nome</strong> ";
}else{
$data2 = "";
}
if ($dia === 'Tue'){
$data3 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data3 = "";
}
if ($dia === 'Wed'){
$data4 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data4 = "";
}
if ($dia === 'Thu'){
$data5 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data5 = "";
}
if($dia === 'Fri'){
$data6 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data6 = "";
}
if ($dia === 'Sat'){
$data7 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data7 = "";
}
if ($dia === 'Sum'){
$data1 = "<span class='label label-danger'>$id1</span> $datal<br>
<strong>$nome</strong> ";
}else{
$data1 = "";
}
?>
<tbody>
<tr>
<td style="background-color: #CEF9FB;" ><?echo $tecnico?></td><td ><?echo $data2?>
</td><td style="background-color: white;"><?echo $data3?></td><td><?echo $data4?>
</td>
<td><?echo $data5?></td><td><?echo $data6?></td><td><?echo $data7?></td><td><?echo
$data1
?></td>
</tr>
</tbody>
<?}?>
</table>
Someone would know how to solve this