> Is it better to log in or out for each query or log in and stay logged in
Under windows: definitely not! There is an issue that ports remain open
for a couple of minutes before they can be reused again. So you can run
out of free ports...
In general: I never even tried it, but I suspect it slows things down a
bit. On the other hand, logging in into a mysql database is not that slow.
Why? It is not that difficult to keep connection or connection wrapping
objects in a variable. And as a programmer you are responsible to
dispose of any resources you open. Even if PHP is a bit forgiving in