]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Queries fixed
[mailer.git] / inc / mysql-manager.php
index d54e46a23322e7a6d2fa4d47e21e218411d5853a..48db0063ba2e835b4f1430f1cc3080cb469e0fd5 100644 (file)
@@ -1605,7 +1605,9 @@ function reduceRecipientReceivedMails ($column, $id, $count) {
                        }
 
                        // Reduce this users total received emails?
-                       if ($num === 0) $userids[$data['userid']] = $data['userid'];
+                       if ($num === 0) {
+                               $userids[$data['userid']] = $data['userid'];
+                       } // END - if
                } // END - while
 
                if (count($userids) > 0) {
@@ -1642,7 +1644,15 @@ function createNewTask ($subject, $notes, $taskType, $userid = NULL, $adminId =
 // @TODO Fix inconsistency between last_module and getWhat()
 function updateLastActivity($userid) {
        // Run the update query
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `last_module`='%s', `last_online`=UNIX_TIMESTAMP(), `REMOTE_ADDR`='%s' WHERE `userid`=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `last_module`='%s',
+       `last_online`=UNIX_TIMESTAMP(),
+       `REMOTE_ADDR`='%s'
+WHERE
+       `userid`=%s
+LIMIT 1",
                array(
                        getWhat(),
                        detectRemoteAddr(),