									<?php
									//$order_id=$_GET['id'];

									$sqlxy = "SELECT id, (select product_name from products where id=purchases.product_id)as product_name, quantity, unit_price, (select symbol from units where UnitID=(select Units from products where id=purchases.product_id))as units  from purchases where purchase_id='$iddx' ";
$resultp = mysqli_query($conn, $sqlxy);

if (mysqli_num_rows($resultp) > 0) {

?>
									<table  width="100%">
						              
						              <tbody>
						              <?php
						                  // output data of each row
    while($rown = mysqli_fetch_assoc($resultp)) {
?>
<tr>
						                  			                  
						                  <td width="40%"><?php echo $rown['product_name']; ?></td>
						                  <td width="20%"><?php echo $rown['quantity']." ".$rown['units']; ?></td>
						                  <td width="20%"><?php echo $rown['unit_price']; ?></td>
						                  <td width="20%"><?php echo $rown['quantity']*$rown['unit_price']; ?></td>
						                  
						                </tr>
						                <?php
       
    }
} else {
    echo "0 results";
}
?>
						                
						                
						              </tbody>
						            </table>