while($row = mysqli_fetch_array($query))
{
//$sql3 ='select * from description where descid = '.$row['descid'].' ';
$query3 = mysqli_query($conn,$sql3);
$row2 = mysqli_fetch_array($query3);
$total =$total + $row['amount'];
echo ' <tr>
<td style="text-align:center">'.$row['amount'].'</td>
<td style="text-align:center">'.$row2['description'].'</td>
<td style="text-align:center">'.$row['info'].'</td>
<td style="text-align:center">'.$row['DATE'].'</td>
<td style="text-align:center">'.$total.'</td>';
?>
<td><a href="insert.php?delete=<?php echo $row['outid']; ?>"
class ="btn btn-danger">delete</a></td>
<?php
echo '
</tr>';
}
}
this code show me all data from expenses table but
how to write php code to . show all expenses grouped by expense description .
My Answer:
Rate this post
3 of 5 based on 7797 votesComments