]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
Speed improvement, TODOs.txt updated:
[mailer.git] / inc / db / lib-mysql3.php
index 80e3a1d5091e08af9605d19ef81c85d19932ebc8..9db8e65beafdc1b83fa8a4eff87a9a24a949c07f 100644 (file)
@@ -220,9 +220,6 @@ function SQL_CONNECT ($host, $login, $password, $F, $L) {
 
        // Set the link resource
        SQL_SET_LINK($linkResource);
-
-       // Destroy cache
-       unset($GLOBALS['is_sql_link_up']);
 }
 
 // SQL select database
@@ -248,9 +245,6 @@ function SQL_CLOSE ($F, $L) {
        // Close link
        SQL_SET_LINK(null);
 
-       // Destroy cache
-       unset($GLOBALS['is_sql_link_up']);
-
        // Return the result
        return $close;
 }
@@ -503,6 +497,9 @@ function SQL_SET_LINK ($link) {
 
        // Set it
        $GLOBALS['sql_link'] = $link;
+
+       // Re-init cache
+       $GLOBALS['is_sql_link_up'] = is_resource($link);
 }
 
 // Checks if the link is up