- $result = SQL_QUERY("SELECT userid, refid, points, timemark
-FROM "._MYSQL_PREFIX."_doubler
-WHERE completed='".$done."' AND is_ref='".$ref."'".$ADD."
-ORDER BY timemark ".$sort."
-LIMIT ".$limit, __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT
+ `userid`, `refid`, `points`, `timemark`
+FROM
+ `{?_MYSQL_PREFIX?}_doubler`
+WHERE
+ `completed`='".$done."' AND `is_ref`='".$ref."'".$add."
+ORDER BY
+ `timemark` ".$sort."
+LIMIT ".$limit, __FUNCTION__, __LINE__);