Created
August 30, 2020 18:35
-
-
Save guibranco/ff6f3ca19f1639a5ed7261e24ea6adf3 to your computer and use it in GitHub Desktop.
Agrupamento forncedor - PHP Brasil - Facebook - https://www.facebook.com/groups/142151625841770/?post_id=3363944120329155&comment_id=3364054290318138&reply_comment_id=3364484050275162¬if_id=1598809668527979¬if_t=group_comment_mention&ref=notif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$soma = 0; | |
$fornecedor = ""; | |
while($mostrar = mysql_fetch_row($result)){ | |
if($fornecedor == "") | |
$fornecedor = $mostrar[3]; | |
if($fornecedor != $mostrar[3]){ | |
?> | |
<td colspan="5" style="text-align: right"><strong>Total:</strong> R$ <?php echo $soma; ?></td> | |
<?php | |
$fornecedor = $mostrar[3]; | |
$soma = 0; | |
} | |
$soma += $mostrar2]; | |
?> | |
<tr> | |
<td><?php echo $mostrar[1] ?></td> | |
<td><?php echo $mostrar[3]; ?></td> | |
<td style="text-align: center"><?php echo "R$ ".$mostrar[2] ?></td> | |
<td style="text-align: center"><?php echo $mostrar[4] ?></td> | |
<td style="text-align: right"><?php echo $mostrar[5]; ?></td> | |
</tr> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment