SHARE
TWEET

Untitled

a guest Jul 18th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <table border="5" class="teste1" method="POST" id="table">
  2. <thead>
  3. <tr>
  4. <th class="filter" style="width:42px; text-align: center; font-size: 12px">Quantidade</th>
  5. <th class="filter" style="width:25px; text-align: center; font-size: 12px">Preço</th>
  6. </tr>
  7. </thead>
  8. <tbody>
  9. <tr>
  10. <?php
  11.     while($rows_cursos = mysqli_fetch_array($resultado_cursos)) {
  12. ?>
  13. <td style="font-size: 12px"> <?php echo $rows_cursos['Quantidade']; ?></td>
  14. <td style="font-size: 12px"> <?php echo $rows_cursos['Preco']; ?></td>
  15. </tr>
  16. <?php } ?>
  17. </tbody>';
  18. <?php
  19. }
  20. ?>
  21. </table>
  22.      
  23. (function ($) {$(document).ready(function () {
  24. $('#table').dataTable({  
  25. "columnDefs": [
  26.    {
  27.     data: null,
  28.     render: function ( data, type, row ) {
  29.         return Math.round( ( row.Quantidade * row.Preco ) )+'€';
  30.     }
  31.    }
  32. ]  
  33. });
  34. })(jQuery)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top