php - Balance is not showing -
here code:
<table width="50%" border="2" bordercolor="green"> <tr> <th>itemname</th> <th>balance</th> </tr> <?php if($qw="select distinct(itemname) details date(date)<='$date' order date desc"){ $qq = mysqli_query($con,$qw); while($r=mysqli_fetch_array($qq,mysqli_assoc)) { ?> <tr> <td><?php echo $r['itemname']; ?></td> <td><?php echo $r['balance']; ?></td> </tr> <?php } } ?> </table>
the given code fetch product itemname balance not fetch database.
your query not include 'balance' field.
change query include it:
select distinct itemname, balance details ...
Comments
Post a Comment