ID: 7529
Updated by: thies
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: PostgreSQL related
Assigned To:
Comments:
believed to be fixed in CVS
Previous Comments:
---------------------------------------------------------------------------
[2000-10-30 05:35:22] [EMAIL PROTECTED]
Assuming that both pg_connect() and pg_close() are called
inside a function, and then pg_connect() is called again
from the main program, the next error will occur:
"Warning: 1 is not a valid PostgreSQL link resource in ..."
examples:
1. NG
function foo() {
$conn = pg_connect(...);
...
pg_close($conn);
}
foo(); # calls pg_connect() and pg_close()
$conn = pg_connect(...); # returns invalid connection id
2. OK
$conn = 0; # defines $conn as a global variable
function foo() {
global $conn;
$conn = pg_connect(...);
...
pg_close($conn);
}
foo(); # calls pg_connect() and pg_close()
$conn = pg_connect(...); # returns VALID connection id
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7529&edit=2
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]