Originally Posted by XmisterIS
It would be nice to be able to keep the resource open. Logically, I don't see that it's an impossible thing to do!
AFAIK (and especially mysql resources), resources are only valid for the lifetime of the script anyway. That means that as soon as the php script terminates, the mysql connection is dead. You cannot ressurrect it in another script instance - the php thread is gone, the mysql thread has been destroyed by the socket closure when php disconnected and it's automatically cleaned itself up.
Now imagine if you were to store a mysql connection resource in a session and then try to access it from multiple scripts that are triggered by a http call - you'd be in a right mess.