More SQL rewrites, TODO: Put all table and column names in backticks (`)
[mailer.git] / inc / pool / pool-bonus.php
index c525382125dfd9d03d3badbc1faf7d81b3b5f340..264b70857d246c8ba472541935121f778107621f 100644 (file)
@@ -86,7 +86,7 @@ if ($cnt < $_CONFIG['max_send']) {
                        foreach ($RECEIVERS as $key => $uid) {
                                // Load personal data
                                //* DEBUG: */ echo "*L:".__LINE__."/".$uid."*<br />";
-                               $result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+                               $result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
                                        array(bigintval($uid)), __FILE__, __LINE__);
 
                                // Is his data available?
@@ -129,7 +129,7 @@ if ($cnt < $_CONFIG['max_send']) {
 
                                                if (GET_EXT_VERSION("user") >= "0.1.4") {
                                                        // Update mails received for receiver
-                                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
+                                                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
                                                                array(bigintval($uid)), __FILE__, __LINE__);
                                                } // END - if