nDh4

Searching

May 30th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. <?php
  2. $con = mysql_connect("localhost", "root", "root");
  3.  
  4. if (!$con) {
  5. die("Error: " . mysql_error());
  6. }
  7.  
  8. mysql_select_db("pln2", $con);
  9.  
  10. $result = mysql_query("SELECT a.HARI, a.TGL, a.ID_PEL, a.NO_METER, a.DY_BR, a.GARDU, a.TIANG, b.NM FROM td_plg a, tm_plg b WHERE a.ID_PEL=b.ID_PEL");
  11. ?>
  12. <!DOCTYPE html>
  13. <html>
  14. <head>
  15. <title>DataTables</title>
  16. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  17.  
  18. <script src="../Datatables/media/js/jquery.js" type="text/javascript"></script>
  19. <script src="../Datatables/media/js/jquery.dataTables.js" type="text/javascript"></script>
  20.  
  21. <style type="text/css">
  22. @import "../Datatables/media/css/demo_table_jui.css";
  23. @import "../Datatables/media/themes/smoothness/jquery-ui-1.8.4.custom.css";
  24. </style>
  25.  
  26. <style>
  27. *{
  28. font-family: arial;
  29. }
  30. </style>
  31. <script type="text/javascript" charset="utf-8">
  32. $(document).ready(function(){
  33. $('#datatables').dataTable({
  34. "sPaginationType":"full_numbers",
  35. "aaSorting":[[2, "desc"]],
  36. "bJQueryUI":true
  37. });
  38. })
  39.  
  40. </script>
  41.  
  42. </head>
  43. <body>
  44. <div>
  45. <table width="86%" class="display" id="datatables">
  46. <thead>
  47. <tr>
  48. <th width="58">Hari</th>
  49. <th width="99">Tanggal</th>
  50. <th width="118">Nama</th>
  51. <th width="129">Id Pelanggan</th>
  52. <th width="145">Nomor Meter</th>
  53. <th width="60">Daya</th>
  54. <th width="77">Gardu</th>
  55. <th width="77">Tiang</th>
  56. </tr>
  57. </thead>
  58. <tbody>
  59. <?php
  60. while ($row = mysql_fetch_array($result)) {
  61. ?>
  62. <tr>
  63. <td><?=$row['HARI']?></td>
  64. <td><?=$row['TGL']?></td>
  65. <td><?=$row['NM']?></td>
  66. <td><?=$row['ID_PEL']?></td>
  67. <td><?=$row['NO_METER']?></td>
  68. <td><?=$row['DY_BR']?></td>
  69. <td><?=$row['GARDU']?></td>
  70. <td><?=$row['TIANG']?></td>
  71. </tr>
  72. <?php
  73. }
  74. ?>
  75. </tbody>
  76. </table>
  77. <form action="../percobaan/c_excel.php">
  78. <p>
  79. <input type="submit" name="cetak" id="cetak" value="Convert Data">
  80. </p>
  81. </form>
  82. </div>
  83. </body>
  84. </html>
Advertisement
Add Comment
Please, Sign In to add comment