Re: postgresql connection index propogating through function calls

From: Date: Wed, 29 Nov 2000 08:15:00 +0000
Subject: Re: postgresql connection index propogating through function calls
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4832@lists.php.net to get a copy of this message
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

« previous php.db (#4832) next »