]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
Surfbar idea added (dummy extension!)
[mailer.git] / inc / db / lib-mysql3.php
index 5e38261c4b25b4489be25d9f905f34e3688104b0..6bb648c436e335a9946240dab05a133c763f70fb 100644 (file)
@@ -84,10 +84,13 @@ function SQL_QUERY($sql_string, $F, $L) {
 
 // SQL num rows
 function SQL_NUMROWS($result) {
-       if ($result != false) {
+       // Is the result a valid resource?
+       if (is_resource($result)) {
+               // Get the count of rows from database
                $lines = @mysql_num_rows($result);
-               if (empty($lines)) $lines = "0";
 
+               // Is the result empty? Then we have an error!
+               if (empty($lines)) $lines = "0";
        } else {
                // No resource given, no lines found!
                $lines = "0";
@@ -152,10 +155,10 @@ function SQL_CONNECT($host, $login, $password, $F, $L) {
        return $connect;
 }
 // SQL select database
-function SQL_SELECT_DB($DB, $link, $F, $L) {
+function SQL_SELECT_DB($dbName, $link, $F, $L) {
        $select = false;
        if (is_resource($link)) {
-               $select = @mysql_select_db($DB, $link) or ADD_FATAL($F." (".$L."):".mysql_error());
+               $select = @mysql_select_db($dbName, $link) or ADD_FATAL($F." (".$L."):".mysql_error());
        }
        return $select;
 }