I get that it is not connecting in this case.
What I don't understand is WHY?
I know that the script does connect and function properly retrieving values from the database.
What I want to know is What would cause it to not connect now and then? I rather doubt the server is flipping a coin and suddenly deciding not to connect me.
Sorry I always like to know the WHY part.