Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with mysql functions

Status
Not open for further replies.

bedrock

Programmer
Nov 6, 2002
94
US
hi, i wrote a simple 3-lined function in an included file as such:

function db_connect($db_name){
$db=mysql_pconnect("localhost","username","password");
mysql_select_db($db_name);
return $db;
}

this functions has worked for a couple weeks now. but just in the last few minutes after struggling with some unrelated (?) sessions stuff now i am getting errors like "mysql_select_db(): 1 is not a valid MySQL-link resource". ive never seen this error nor do i have a clue what it means, could someone pls help?!
 
thanks for the tip sleipnir, but i got my problems resolved. i fixed the settings i messed with in my ini file and corrected some problems with my code and its ok now :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top