28.01.2014, 11:19
You have to assume that it is connected. If it isn't, the internal automated reconnect mechanism will be started (unless you deactivate it in mysql_connect and as long as it's a threaded query). For unthreaded functions like mysql_query or mysql_escape_string you'll need to check with mysql_errno.