Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('koneksi.php'); ?>
- <table border="1" width="100%" cellspacing="0" >
- <tr>
- <th>No</th>
- <th>Kode Bustech</th>
- <th>Tanggal Pengajuan</th>
- <th>Tanggal Diperlukan</th>
- <th>Status</th>
- <th>Keterangan</th>
- <th>Nama Barang</th>
- <th>Satuan</th>
- <th>Jumlah</th>
- <th>Harga</th>
- <th>Total Harga</th>
- </tr>
- <?php
- $no= 1;
- $sql="
- SELECT
- a.kode_bustech_po,
- a.tanggal_pengajuan,
- a.tanggal_diperlukan,
- a.stats_pr,
- a.keterangan_barang,
- b.nama_barang,
- b.satuan,
- b.jumlah,
- b.harga,
- b.total_harga
- FROM
- t_po a
- JOIN t_barang_po b USING(kode_bustech_po)
- "
- .(isset($_GET['kode_bustech_po'])?
- "WHERE
- a.kode_bustech_po='{$_GET['kode_bustech_po']}' ":"");
- $query=mysql_query($sql,$koneksi) or die('terjadi kesalahan :'.mysql_error());
- if(mysql_num_rows($query)>0)
- {
- $no=0;
- while($barang=mysql_fetch_assoc($query))
- {
- ?>
- <tr>
- <td><?php echo ++$no; ?></td>
- <td><?php echo $barang['kode_bustech_po'] ?> </td>
- <td><?php echo $barang['tanggal_pengajuan'] ?> </td>
- <td><?php echo $barang['tanggal_diperlukan'] ?> </td>
- <td><?php echo $barang['stats_pr'] ?> </td>
- <td><?php echo $barang['keterangan_barang'] ?> </td>
- <td><?php echo $barang['nama_barang'] ?> </td>
- <td><?php echo $barang['satuan'] ?> </td>
- <td><?php echo $barang['jumlah'] ?> </td>
- <td><?php echo $barang['harga'] ?> </td>
- <td><?php echo $barang['total_harga'] ?> </td>
- </tr>
- <?php
- }
- }
- ?>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment