Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Contoh Penggunaan PostgreSQL Extension
- * @author Pusat Ilmu Secara Detil
- * @version 1.0
- */
- pg_connect("host=localhost port=5432 dbname=mahasiswa user=posgres password=root" );
- /*** Query Select ***/
- $query = pgsql_query("select * from mhs");
- while($mhs = pgsql_fetch_array($query))
- {
- print $mhs['nim'] .' - '. $mhs['nama'] .' - '.$mhs['alamat']. '<br />';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement