+// Free result
+SQL_FREERESULT($result);
+
+// Load sent orders
+$result = SQL_QUERY_ESC("SELECT
+ `id`,`cat_id`,`payment_id`,`subject`,`url`,`timestamp_ordered`,`max_rec`,`timestamp_send`,`clicks`
+FROM
+ `{?_MYSQL_PREFIX?}_user_stats`
+WHERE
+ `userid`=%s
+ORDER BY
+ `timestamp_ordered` DESC",
+ array(getMemberId()), __FILE__, __LINE__);
+
+if (!SQL_HASZERONUMS($result)) {