} // END - if
// Run SQL string to check for accounts
- $result_main = SQL_QUERY("SELECT
+ $result_main = SQL_QUERY('SELECT
`userid`, `email`, `gender`, `surname`, `family`, (0" . $add . ") AS points
FROM
`{?_MYSQL_PREFIX?}_user_data`
-" . $whereStatement1 . "
+' . $whereStatement1 . '
ORDER BY
`points` DESC,
`userid` ASC
-LIMIT {?bonus_ranks?}", __FILE__, __LINE__);
+LIMIT {?bonus_ranks?}', __FILE__, __LINE__);
// Some entries were found?
- if (SQL_NUMROWS($result_main) > 0) {
+ if (!SQL_HASZERONUMS($result_main)) {
// Load our winners...
while ($content = SQL_FETCHARRAY($result_main)) {
// Make sure zero points are not mailed
// Load email template and email it away
$message = loadEmailTemplate('member_bonus', $content, bigintval($content['userid']));
- sendEmail($content['email'], '{--BONUS_MONTHLY_ONLINE_BONUS--}', $message);
+ sendEmail($content['email'], '{--MEMBER_MONTHLY_BONUS_WON_SUBJECT--}', $message);
} // END - if
} // END - while