[nycphp-talk] mysql_close() error
Daniel Convissor
danielc at analysisandsolutions.com
Tue Dec 21 17:15:37 EST 2004
On Tue, Dec 21, 2004 at 04:20:31PM -0500, Frank Wong wrote:
>
> Warning: mysql_close(): 12 is not a valid MySQL-Link resource
Sounds like the database connection was already closed somewhere else
in your scripts. Comment out all calls to mysql_close() except this
one you're talking about.
If that isn't it, how about doing some debugging? What you've given
here is pseudo code, leaving out a lot of stuff, so ther's no way we
can know what's really going on, plus having such a large example is
distracting you from the problem at hand. You need to make a REAL
self contained example that breaks down everything to the simplest
level possible:
<?php
// set the $host, etc, vars here...
$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");
mysql_close($link);
?>
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list