Search DaTutorials:  
HOME
Php Tutorials
Articles
Basics
Date and Time
File Manipulations
Forms
Functions
General
Interactivity
MySql
Navigation
News,Shoutboxes and Blogs
Language Structure and Data Types
Searching
Security
String Manipulation
User Information and Stats
Search For a Tutorial
Php Reference

pg_close

(PHP 3, PHP 4 , PHP 5)

pg_close -- Closes a PostgreSQL connection

Description

bool pg_close ( resource connection)

pg_close() closes the non-persistent connection to a PostgreSQL database associated with the given connection resource. Returns TRUE on success or FALSE on failure.

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

Example 1. pg_close() example

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

If there is open large object resource on the connection, do not close the connection before closing all large object resources.



Copyright © 2001-2004 The PHP Group
All rights reserved.

     Adverse Credit Remortgage | Mortgage Calculator | Discount Magazine Subscriptions | Personal Loans | Best Credit Cards
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp