Hey All - just wanted to check in with anyone who has used this function. I currectly have a function that I created, and inside it I have this function.
Outside of my custom function I have a mysql_pconnect() statement and a mysql_select_db() statement. I also have another custom function that runs a SQL query and returns the results. My problem is why does the custom function with mysql_list_fields(), fail to run unless I put a separate pconnect and select_db statement in the custom function itself and my other custom function can query the DB fine. $db = mysql_pconnect("ip", "user", "password"); mysql_select_db("db"); function one() { $db = mysql_pconnect("ip", "user", "password"); mysql_select_db("db"); $fields = mysql_list_fields("db", "table"); } function two() { $q = "SELECT * FROM user"; $result = mysql_query($q); return $result; } 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? Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php