On Line Oracle /Like/PostgreSQL-Query-with-PHP ||
IIS in windows 7 and windows 8.1 ultimate workstation
Using: pg_connect ("host=$host dbname=$db user=$user password=$pass");
re-load()||


: $sql "; //} $dbconn = pg_connect ("host=$host dbname=$db user=$user password=$pass"); if (!$dbconn) { die("Could not open connection to database server"); } echo "
Connection successful
"; // //echo "(alert($sql)}"; $result = pg_query($dbconn, $sql); // if ($result) { echo "The query executed successfully.
\n"; // show name of the fields $i = pg_num_fields($result); echo" "; for ($j = 0; $j < $i; $j++) { echo ""; } echo "
"; $fieldname = pg_field_name($result, $j); echo $fieldname."
"; // echo"
"; echo" "; // for ($row = 0; $row < pg_num_rows($result); $row++) { //embbedding for loop echo ""; for($y=0; $y < pg_num_fields($result) ; $y++) { $r2 = pg_fetch_result($result, $row, $y); echo " "; } // nested for echo ""; } echo "
".$r2."
"; pg_free_result($result); } else { echo "The query failed with the following error:
\n"; echo pg_last_error($db_handle); } echo "freed result"; pg_close($dbconn); } ?>