//$conn=pg_Connect ("testing","test","test");
$conn_string = "host=localhost dbname=testing user=test password= test";
$conn = pg_connect($conn_string);
//$conn=pg_Connect("dbname=testing");
if (!$conn){
echo "Error Koneksi";
}else {
$sql = "select * from testah";
$result =pg_query($conn, $sql);
while ($row = pg_fetch_array($result)){
echo $row["id"]. " - " . $row["nama"] . " - " . $row["alamat"] . "
";
}
}
hasilnya :
2 - alisyahbanas - jl. japati no. 1
1 - sentots - jl. arwana no. 1
Senin, Februari 16, 2009
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar