[snip]
Ok, this ended up working well. I'm still wondering why in my example
function two() works, without needing to provide the resource identifier
to mysql_query(), how can mysql_query() pick up the resource identifier
automatically while mysql_list_fields does not?
[/snip]
>From http://www.php
Ok, this ended up working well. I'm still wondering why in my example
function two() works, without needing to provide the resource identifier
to mysql_query(), how can mysql_query() pick up the resource identifier
automatically while mysql_list_fields does not?
Thx-
Matt
On Mon, 2003-11-10 at 17
as said, use the global construct. This is a scope problem, read the
manual about variable scope.
php.net/variables.scope
PS: sorry Jay, new mail frontend :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Ok, I added the resource identifier, and got an error. I think what is
happening now is the resource identifier $db is outside the function
one(), so it cannot be referenced from the mysql_list_fields() fuction
which is inside. Does that make sense? Is the resource indentifier a
GLOBAL thing
On Mon, 2003-11-10 at 16:43, Jay Blanchard wrote:
> [snip]
> Outside of my custom function I have a mysql_pconnect() statement and a
> mysql_select_db() statement.
>
> So the end result being if I take the connect statement out of the
> function one(), it fails, but function two() still works!
>
[snip]
Outside of my custom function I have a mysql_pconnect() statement and a
mysql_select_db() statement.
So the end result being if I take the connect statement out of the
function one(), it fails, but function two() still works!
Am I doing something wrong here?
[/snip]
It's just a small misu
6 matches
Mail list logo