Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / daily / daily_birthday.php
index 97f8b3775b4826f21860e0ec6ede3ca1ebf0dfa3..81aeb519b1fb55139970b3e75ace1153382172e1 100644 (file)
@@ -72,7 +72,7 @@ if (isExtensionActive('holiday')) {
 } // END - if
 
 // Only confirmed members shall receive birthday mails...
-$result_birthday = SQL_QUERY_ESC("SELECT
+$result_birthday = sqlQueryEscaped("SELECT
        `d`.`userid`,
        `d`.`email`,
        `d`.`birth_year`
@@ -89,9 +89,9 @@ ORDER BY
        `d`.`userid` ASC",
        array($day, $month), __FILE__, __LINE__);
 
-if (!SQL_HASZERONUMS($result_birthday)) {
+if (!ifSqlHasZeroNums($result_birthday)) {
        // Start sending out birthday mails
-       while ($content = SQL_FETCHARRAY($result_birthday)) {
+       while ($content = sqlFetchArray($result_birthday)) {
                // Calculate own timestamp for birthday and today
                $bd  = $content['birth_year'] + 12 * $month + 365 * $day;
                $now = $year  + 12 * $month + 365 * $day;
@@ -110,7 +110,7 @@ if (!SQL_HASZERONUMS($result_birthday)) {
                        } // END - for
 
                        // Insert row into database
-                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`, `points`, `chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
+                       sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`, `points`, `chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
                                array(
                                        bigintval($content['userid']),
                                        $content['check']
@@ -127,12 +127,12 @@ if (!SQL_HASZERONUMS($result_birthday)) {
                sendEmail($content['userid'], '{--MEMBER_HAPPY_BIRTHDAY_SUBJECT--}', $message);
 
                // Remember him that he has received a birthday mail
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `birthday_sent`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
+               sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `birthday_sent`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
                        array(bigintval($content['userid'])), __FILE__, __LINE__);
        } // END - while
 
        // Free memory
-       SQL_FREERESULT($result_birthday);
+       sqlFreeResult($result_birthday);
 } // END - if
 
 // Debug line