-$result = SQL_QUERY_ESC("SELECT userid, ".$ADD.", last_online
-FROM "._MYSQL_PREFIX."_user_data
-WHERE last_online >= %s AND status='CONFIRMED'
-ORDER BY last_online DESC LIMIT %s",
- array($START, $CONFIG['active_limit']), __FILE__, __LINE__);
+// Check for members who were active only this day
+$result = SQL_QUERY("SELECT
+ `userid`, `".$add."`, `last_online`
+FROM
+ `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+ `last_online` >= {?START_TDAY?} AND `status`='CONFIRMED'
+ORDER BY
+ `last_online` DESC
+LIMIT {?active_limit?}", __FILE__, __LINE__);