- $result = SQL_QUERY_ESC("SELECT s.id, s.userid, s.pool_id, t.price
-FROM "._MYSQL_PREFIX."_user_stats AS s
-LEFT JOIN "._MYSQL_PREFIX."_payments AS t
-ON s.payment_id=t.id
-WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
- array(bigintval($PURGE)), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT
+ s.id, s.userid, s.pool_id, t.price
+FROM
+ `{?_MYSQL_PREFIX?}_user_stats` AS s
+LEFT JOIN
+ `{?_MYSQL_PREFIX?}_payments` AS t
+ON
+ s.payment_id=t.id
+WHERE
+ s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s)
+ORDER BY
+ s.userid ASC",
+ array(bigintval($PURGE)), __FILE__, __LINE__);