All database names are now 'back-ticked' and constant _MYSQL_PREFIX is wrapped. Partl...
[mailer.git] / inc / modules / admin / what-email_archiv.php
index cde9710ce303b01007c1a540376a3cf07187b38f..6f660da7ed28802dcd63c29c23c3337c54239b63 100644 (file)
@@ -45,7 +45,7 @@ ADD_DESCR("admin", __FILE__);
 
 //             0     1        2      3        4          5           6          7      8         9        10
 $SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
- FROM "._MYSQL_PREFIX."_pool
+ FROM `{!MYSQL_PREFIX!}_pool`
  WHERE data_type='SEND' OR data_type='DELETED'
  ORDER BY timestamp DESC";
 
@@ -86,7 +86,7 @@ if (SQL_NUMROWS($result) > 0)
        while ($pool = SQL_FETCHROW($result))
        {
                // Check sent mails and clicks
-               $result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1",
+               $result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{!MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
                 array(bigintval($pool[0])), __FILE__, __LINE__);
                list($sent, $clicks) = SQL_FETCHROW($result_mails);
                SQL_FREERESULT($result_mails);