CodeChargenewbie
Posts: 114
|
| Posted: 11/09/2007, 9:49 AM |
|
I'm getting a rather odd error inside of before show event.
Quote :
// before show function begins
$db = new clsDBTESTdatabase();
// code goes here
$db->close();
// before show function ends
When I load the page, it gives me "Warning: mssql_close(): 10 is not a valid MS SQL-Link resource..."
I changed it to this:
Quote :
// before show function begins
global $db;
$db = new clsDBTESTdatabase();
// code goes here
$db->close();
// before show function ends
And I don't get that error anymore. This one also works:
Quote :
// before show function begins
$db = new clsDBTESTdatabase();
// code goes here
unset($db);
// before show function ends
What I don't understand is why. Can someone please explain this to me? Thank you.
|