PHP.nl

pg_close

pg_close

Closes a PostgreSQL connection

true **pg_close**  $connection
closes the non-persistent

connection to a PostgreSQL database associated with the given instance. pg_close``connection

Opmerking: > Using is not usually necessary, as non-persistent open connections are automatically closed at the end of the script. pg_close

If there is open instance on the connection, do not close the connection before closing all instances. PgSql\Lob``PgSql\Lob

connection

return.true.always

Voorbeeld: example

<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=mary")
   or die("Could not connect");
echo "Connected successfully";
pg_close($dbconn);
?>
Connected successfully

pg_connect