arsiarne

Untitled

Feb 6th, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['submit'])){
  3. $cari= $_POST['cari'];
  4. $tes ="SELECT COUNT( * )FROM aset WHERE tahun LIKE%$cari%";
  5. ?>
  6. <table class="table table-bordered table-hover ">
  7. <thead>
  8. <tr>
  9. <th style="width:10px;">NO</th>
  10. <th class="col-lg-3 ">JENIS</th>
  11. <th class="col-lg-2 ">PENGGUNA</th>
  12. <th class="col-lg-2 ">LOKASI</th>
  13. <th class="col-lg-2 ">KOTA</th>
  14. <th>LUAS(m2)</th>
  15. <th>Nilai</th>
  16. <th>ASAL-USUL</th>
  17.  
  18. </tr>
  19. </thead>
  20. <tbody>
  21. <tr>
  22. <td colspan="9"><b>PENDIDIKAN</b></td>
  23. </tr>
  24. <?php
  25. $sql = "SELECT `jenis` , `asal_usul` , `pengguna` , `lokasi` ,`nilai`,`kota`,`luas` FROM `aset` WHERE `skpd` = 'Dinas Pendidikan' and LIKE%$cari%";
  26. $query= mysql_query($sql);
  27. $no=0;
  28. while ($row = mysql_num_rows($query)){
  29. $no++;
  30. ?>
  31. <tr>
  32. <td><?php echo $no ?></td>
  33. <td><?php echo $row[3]?></td>
  34. <td><?php echo $row[6]?></td>
  35. <td><?php echo $row[7]?></td>
  36. <td><?php echo $row[9]?></td>
  37. <td><?php echo $row[8]?></td>
  38. <td><?php echo $row[4]?></td>
  39. <td><?php echo $row[5]?></td>
  40.  
  41. </tr>
  42.  
  43. <?php
  44. }
  45.  
  46. }
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment