cahyadsn

po

Jan 10th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.66 KB | None | 0 0
  1. <?php
  2. include('koneksi.php'); ?>
  3. <table border="1" width="100%" cellspacing="0" >
  4.   <tr>
  5.     <th>No</th>
  6.     <th>Kode Bustech</th>
  7.     <th>Tanggal Pengajuan</th>
  8.     <th>Tanggal Diperlukan</th>
  9.     <th>Status</th>
  10.     <th>Keterangan</th>
  11.     <th>Nama Barang</th>
  12.     <th>Satuan</th>
  13.     <th>Jumlah</th>
  14.     <th>Harga</th>
  15.     <th>Total Harga</th>
  16.   </tr>
  17. <?php
  18.   $no= 1;
  19.   $sql="
  20.        SELECT
  21.          a.kode_bustech_po,
  22.          a.tanggal_pengajuan,
  23.          a.tanggal_diperlukan,
  24.          a.stats_pr,
  25.          a.keterangan_barang,
  26.          b.nama_barang,
  27.          b.satuan,
  28.          b.jumlah,
  29.          b.harga,
  30.          b.total_harga
  31.        FROM
  32.          t_po a
  33.          JOIN t_barang_po b USING(kode_bustech_po)
  34.        "
  35.        .(isset($_GET['kode_bustech_po'])?
  36.         "WHERE
  37.          a.kode_bustech_po='{$_GET['kode_bustech_po']}' ":"");
  38.   $query=mysql_query($sql,$koneksi) or die('terjadi kesalahan :'.mysql_error());
  39.   if(mysql_num_rows($query)>0)
  40.   {
  41.     $no=0;
  42.     while($barang=mysql_fetch_assoc($query))
  43.     {
  44. ?>
  45.   <tr>
  46.     <td><?php echo ++$no; ?></td>
  47.     <td><?php echo $barang['kode_bustech_po'] ?> </td>
  48.     <td><?php echo $barang['tanggal_pengajuan'] ?> </td>
  49.     <td><?php echo $barang['tanggal_diperlukan'] ?> </td>
  50.     <td><?php echo $barang['stats_pr'] ?> </td>
  51.     <td><?php echo $barang['keterangan_barang'] ?> </td>
  52.     <td><?php echo $barang['nama_barang'] ?> </td>
  53.     <td><?php echo $barang['satuan'] ?> </td>
  54.     <td><?php echo $barang['jumlah'] ?> </td>
  55.     <td><?php echo $barang['harga'] ?> </td>
  56.     <td><?php echo $barang['total_harga'] ?> </td>
  57.   </tr>
  58.   <?php
  59.     }
  60.   }
  61. ?>
  62. </table>
Advertisement
Add Comment
Please, Sign In to add comment