Introduced new wrapper functions to make the code more readable, new extension ext...
[mailer.git] / inc / libs / admins_functions.php
index f86d80446e3003863557f790cbc8e78204b76d2a..e0424383fbfd88db20236932c865e1ce6a130017 100644 (file)
@@ -431,7 +431,7 @@ function sendAdminsEmails ($subj, $template, $content, $userid) {
        // Check which admin shall receive this mail
        $result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
                array($template), __FUNCTION__, __LINE__);
-       if (SQL_NUMROWS($result) == '0') {
+       if (SQL_HASZERONUMS($result)) {
                // Create new entry (to all admins)
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",
                        array($template), __FUNCTION__, __LINE__);