Partners & Affiliates














Re: [PHP-DB] postgresql connection index propogating through function calls From: Alexey Borzov (borz_off <email protected>)
Date: 11/29/00

Greetings, Dave!

At 29.11.2000, 11:07, you wrote:

DV> Should not the initial database connection index be valid for all pg_exec
DV> calls even if nexted within functions?
    If you omit database handler, the default will be used (since
4.0.3, I suppose). If you pass something strange instead, PHP will get
confused...

DV> Cannot get nexted functions to respond to the pointer at all even when the
DV> $datanase variable is passed through each nested function call (am I still
DV> making sense?).
    You see, there are two variable scopes in PHP - global and local
to a specific function. if you want to use global variables - declare
them global:
function foo() {
    global $database;
}
Nothing will be propagated from function to function...

-- 
Yours, Alexey V. Borzov, Webmaster of RDW

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>