RE: [PHP] mysql_list_fields() bug?

From: Date: Mon, 10 Nov 2003 22:00:45 +0000
Subject: RE: [PHP] mysql_list_fields() bug?
Groups: php.general 
Request: Send a blank email to php-general+get-169096@lists.php.net to get a copy of this message
[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); }

« previous php.general (#169096) next »