<?php
include_once("func/functions.php"); // Chama o arquivo de funções
function diaria($codmot,$periodo)
{
$data = (explode(" - ",$periodo));
$datIni = date('Y-m-d',strtotime($data[0]));
$datFin = date('Y-m-d',strtotime($data[1]));
$conn_datapar = connect();
$sql = "SP_TI_DIARIAS_E_LANCHES $codmot,'$datIni 00:00:00', '$datFin 23:59:59', 117";
$stmt = sqlsrv_query($conn_datapar, $sql);
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC))
{
$ficha = $row["CODFIC"];
$data = $row["DATREF"]->format('d-m-Y H:i');
$obs = $row["OBSERV"];
$valor = $row["VLRADI"];
echo "
<tbody>
<tr>
<td>".$ficha."</td>
<td>".$data."</td>
<td>".$obs."</td>
<td>R$".$valor."</td>
</tr>
</tbody>
";
}
}
Good afternoon guys! I really need your help. I have a table (php), filled with information from DB, I need these results, when the value of. $ Value., Is negative, the line is red, when positive it turns green. NOTE: I used the grid, and it worked, it was exactly as I wanted it, but the table gets better visualization and my boss wants it done with a table. Does anyone know how to help me? Thanks in advance.