- $result_ref = SQL_QUERY_ESC("SELECT SUM(points) FROM "._MYSQL_PREFIX."_doubler WHERE refid=%s AND completed='N' AND is_ref='Y'",
- array(bigintval($uid)), __FILE__, __LINE__);
- list($ref) = SQL_FETCHROW($result_ref);
-
- // Free memory
- SQL_FREERESULT($result_ref);
+ $ref = GET_TOTAL_DATA($uid, "doubler", "points", "refid", false, " AND completed='N' AND is_ref='Y'");