Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / libs / bonus_functions.php
index d5b51b782ab0f36a2275b5008d4c1eb80757e9b1..b37f45c61cbd173e657aa5d7e231da8dcc1d5b0e 100644 (file)
@@ -157,7 +157,7 @@ function addBonusRanks ($data, $type, $userid) {
        // Load rankings
        $result = sqlQueryEscaped("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `%s`=%s ORDER BY `level` ASC LIMIT {?bonus_lines?}",
                array($type, $data), __FUNCTION__, __LINE__);
        // Load rankings
        $result = sqlQueryEscaped("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `%s`=%s ORDER BY `level` ASC LIMIT {?bonus_lines?}",
                array($type, $data), __FUNCTION__, __LINE__);
-       if (!ifSqlHasZeroNums($result)) {
+       if (!ifSqlHasZeroNumRows($result)) {
                // Output all ranks (levels)
                for ($rank = 1; $rank <= sqlNumRows($result); $rank++) {
                        // Load data
                // Output all ranks (levels)
                for ($rank = 1; $rank <= sqlNumRows($result); $rank++) {
                        // Load data