NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql_close() error

Frank Wong frank_wong2 at informationideas.com
Tue Dec 21 16:20:31 EST 2004


Has anyone seen an error like this before?

Warning: mysql_close(): 12 is not a valid MySQL-Link resource

I connected to the DB using
*************************************************************************
	// Connecting, selecting database //
	$link = mysql_connect($host, $sys_user, $sys_password)
		or die("Could not connect : " . mysql_error());
		mysql_select_db($sys_db) or die("Could not select database");
*************************************************************************

I tried to close using
*************************************************************************
	// Closing connection //
	mysql_close($link);
*************************************************************************

Other than that, I only use the $link to query the DB.  How does $link
become 12 as stated in the error message?  This is driving me nuts...

TIA for any help.
________________________
Frank Wong
Consultant
Information Ideas
www.informationideas.com




More information about the talk mailing list