1. Setting di XAMPP config di php.ini
;extension=php_pdo_pgsql.dll
;extension=php_pgsql.dll
hapus ;
2. Membuat koneksi:
<?php
$host = "localhost";
$user = "postgres";
$pass = "071002239";
$db = "dikti";
$con = pg_connect("host=$host dbname=$db user=$user password=$pass")
or die ("Could not connect to server\n");
$query = "QUERY DISINI";
$result = pg_query($con, $query);
pg_close($con);
?>
;extension=php_pdo_pgsql.dll
;extension=php_pgsql.dll
hapus ;
2. Membuat koneksi:
<?php
$host = "localhost";
$user = "postgres";
$pass = "071002239";
$db = "dikti";
$con = pg_connect("host=$host dbname=$db user=$user password=$pass")
or die ("Could not connect to server\n");
$query = "QUERY DISINI";
$result = pg_query($con, $query);
pg_close($con);
?>
Comments
Post a Comment