- $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",
+ $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",