[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