Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / libs / rallye_functions.php
index bbd4bfa33a4aaa4d6cd07216ed504fb5e35b964e..a0812bb3a2586d85cc904fc18657eb497f5ded77 100644 (file)
@@ -92,7 +92,7 @@ LIMIT 1",
                        array(bigintval($content['id']), bigintval($content['userid'])), __FUNCTION__, __LINE__);
 
                // Is there an entry?
-               if (ifSqlHasZeroNums($result_ref)) {
+               if (ifSqlHasZeroNumRows($result_ref)) {
                        // Add userid and his ref count to table
                        $result_ref = sqlQueryEscaped("SELECT
        SUM(`p`.`points`) AS `points`
@@ -192,7 +192,7 @@ ORDER BY
                array($rallye), __FUNCTION__, __LINE__);
 
        // Entries found?
-       if (!ifSqlHasZeroNums($result_prices)) {
+       if (!ifSqlHasZeroNumRows($result_prices)) {
                // Load prices
                $prices = '';
                if ($mode == PHP_EOL) {
@@ -429,7 +429,7 @@ LIMIT 1",
                        ), __FUNCTION__, __LINE__);
 
                // Is this user added?
-               if (ifSqlHasZeroNums($result)) {
+               if (ifSqlHasZeroNumRows($result)) {
                        // Add userid and his ref count to table
                        sqlQueryEscaped("INSERT INTO
        `{?_MYSQL_PREFIX?}_rallye_users`
@@ -848,7 +848,7 @@ WHERE
        `expired`='Y'",
                array($EXPIRE), __FUNCTION__, __LINE__);
 
-       if (!ifSqlHasZeroNums($result_rallye)) {
+       if (!ifSqlHasZeroNumRows($result_rallye)) {
                // Init SQLs
                initSqls();