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:00, Jay Blanchard wrote:
> [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, because I sure didn't make it one :) The error I got was,
> "supplied argument is not a valid Mysql-Link resource".
> [/snip]
> 
> Add GLOBAL to the function ....
> 
> function one() {
>   global $db;
>   mysql_select_db("db");
>   $fields = mysql_list_fields("db", "table", $db);
> }

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to