RE: [PHP] mysql_list_fields() bug?

2003-11-11 Thread Jay Blanchard
[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

RE: [PHP] mysql_list_fields() bug?

2003-11-10 Thread Matt Babineau
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

RE: [PHP] mysql_list_fields() bug?

2003-11-10 Thread Derek Ford
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

RE: [PHP] mysql_list_fields() bug?

2003-11-10 Thread Jay Blanchard
[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

RE: [PHP] mysql_list_fields() bug?

2003-11-10 Thread Matt Babineau
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! >

RE: [PHP] mysql_list_fields() bug?

2003-11-10 Thread Jay Blanchard
[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