“Rivals can easily copy your improvements in quality and efficiency.
But they shouldn’t be able to copy your strategic positioning –
what distiguishes your company from all the rest.”

Michael A. Porter, 1996.

Senin, Februari 16, 2009

PHP & PostGre : Koneksi Select

//$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

Tidak ada komentar:

Posting Komentar