Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['submit'])){
- $cari= $_POST['cari'];
- $tes ="SELECT COUNT( * )FROM aset WHERE tahun LIKE%$cari%";
- ?>
- <table class="table table-bordered table-hover ">
- <thead>
- <tr>
- <th style="width:10px;">NO</th>
- <th class="col-lg-3 ">JENIS</th>
- <th class="col-lg-2 ">PENGGUNA</th>
- <th class="col-lg-2 ">LOKASI</th>
- <th class="col-lg-2 ">KOTA</th>
- <th>LUAS(m2)</th>
- <th>Nilai</th>
- <th>ASAL-USUL</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td colspan="9"><b>PENDIDIKAN</b></td>
- </tr>
- <?php
- $sql = "SELECT `jenis` , `asal_usul` , `pengguna` , `lokasi` ,`nilai`,`kota`,`luas` FROM `aset` WHERE `skpd` = 'Dinas Pendidikan' and LIKE%$cari%";
- $query= mysql_query($sql);
- $no=0;
- while ($row = mysql_num_rows($query)){
- $no++;
- ?>
- <tr>
- <td><?php echo $no ?></td>
- <td><?php echo $row[3]?></td>
- <td><?php echo $row[6]?></td>
- <td><?php echo $row[7]?></td>
- <td><?php echo $row[9]?></td>
- <td><?php echo $row[8]?></td>
- <td><?php echo $row[4]?></td>
- <td><?php echo $row[5]?></td>
- </tr>
- <?php
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment