[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 misunderstanding Matt. Your

$db = mysql_pconnect("ip", "user", "password");

is LOCAL to the function http://us3.php.net/language.variables.scope

The other connection string you mention sits OUTSIDE of any other
function, so it is GLOBAL (you didn't show that code). You are not
calling for the GLOBAL connection in function one. As someone famous
once said, "Location, location, location!"

If you add the resource identifier to the request in function one to

$fields = mysql_list_fields("db", "table", $db);

it should work just fin

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

Reply via email to