Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysql_connect("localhost", "root", "root");
- if (!$con) {
- die("Error: " . mysql_error());
- }
- mysql_select_db("pln2", $con);
- $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");
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>DataTables</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <script src="../Datatables/media/js/jquery.js" type="text/javascript"></script>
- <script src="../Datatables/media/js/jquery.dataTables.js" type="text/javascript"></script>
- <style type="text/css">
- @import "../Datatables/media/css/demo_table_jui.css";
- @import "../Datatables/media/themes/smoothness/jquery-ui-1.8.4.custom.css";
- </style>
- <style>
- *{
- font-family: arial;
- }
- </style>
- <script type="text/javascript" charset="utf-8">
- $(document).ready(function(){
- $('#datatables').dataTable({
- "sPaginationType":"full_numbers",
- "aaSorting":[[2, "desc"]],
- "bJQueryUI":true
- });
- })
- </script>
- </head>
- <body>
- <div>
- <table width="86%" class="display" id="datatables">
- <thead>
- <tr>
- <th width="58">Hari</th>
- <th width="99">Tanggal</th>
- <th width="118">Nama</th>
- <th width="129">Id Pelanggan</th>
- <th width="145">Nomor Meter</th>
- <th width="60">Daya</th>
- <th width="77">Gardu</th>
- <th width="77">Tiang</th>
- </tr>
- </thead>
- <tbody>
- <?php
- while ($row = mysql_fetch_array($result)) {
- ?>
- <tr>
- <td><?=$row['HARI']?></td>
- <td><?=$row['TGL']?></td>
- <td><?=$row['NM']?></td>
- <td><?=$row['ID_PEL']?></td>
- <td><?=$row['NO_METER']?></td>
- <td><?=$row['DY_BR']?></td>
- <td><?=$row['GARDU']?></td>
- <td><?=$row['TIANG']?></td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- <form action="../percobaan/c_excel.php">
- <p>
- <input type="submit" name="cetak" id="cetak" value="Convert Data">
- </p>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment