Advertisement
androidmaker155

PHP

Oct 14th, 2014
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.37 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Contoh Penggunaan MySQL Extension
  4.  * @author Pusat Ilmu Secara Detil
  5.  * @version 1.0
  6.  */
  7.  
  8. mysql_connect("localhost", "root", "");
  9. mysql_select_db("mahasiswa");
  10.  
  11. /*** Query Select ***/
  12. $query = mysql_query("select * from mhs");
  13.  
  14. while($mhs = mysql_fetch_array($query))
  15. {
  16.     print $mhs['nim'] .' - '. $mhs['nama'] .' - '.$mhs['alamat']. '<br />';
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement