I have a service control system.
I would like to issue a service report and add these values but I did not want to do with the command in sql
I want to make direct in php
, type sum values of column valor_trabalho
of listed services only
would be like this
OS | DESCRICAO | VALOR
1 | visita | 150,00
2 | visita | 130,00
total = ???
My sql and so
$trabalho=mysql_query( "SELECT * FROM cad_trabalho WHERE id_trabalho = '$id'");'
I use this function to display the data
<?php
while($row = mysql_fetch_object($trabalho)) {
echo "<tr><td>$row->os</td><td>$row->descricao</td><td>$row->valor</td></tr>
<tr>total = ???</tr>";
}
?>