Código PHP:
  
<table id="dataTables1" class="table table-bordered table-striped table-hover">
      
            <thead>
              <tr>
                <td class="center">No.</td>
                <td class="center">Total Pagos Mensuales</td>
                <td class="center">Total Pagos Anuales</thd>
                <td></td>
              </tr>
            </thead>
            <tbody>
            <?php  
            $no = 1;
            $query = mysqli_query($mysqli, "select sum(precio_venta) from pagos")
                                            or die('error: '.mysqli_error($mysqli));
 
 
            while ($data = mysqli_fetch_assoc($query)) { 
              $precio_venta = format_rupiah($data['precio_venta']);
           
              echo "<tr>
                      <td width='30' class='center'>$no</td>
                      <td width='180' class='center'><b>$data[precio_venta]</b></td>
                      
                    </tr>";
              $no++;
            }
            ?>
            </tbody>
          </table>   Muchas gracias de antemano
Salu2
 

