- $result = SQL_QUERY_ESC("SELECT `userid`, `count` AS `total_visits`, UNIX_TIMESTAMP(`last_online`) AS `last_online`
-FROM `{!_MYSQL_PREFIX!}_surfbar_stats`
-WHERE `url_id`=%s
-ORDER BY `userid` ASC",
- array(bigintval(REQUEST_GET('url_id'))), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT
+ `stats_userid`,
+ `stats_count` AS `total_visits`,
+ UNIX_TIMESTAMP(`stats_last_surfed`) AS `last_surfed`
+FROM
+ `{?_MYSQL_PREFIX?}_surfbar_stats`
+WHERE
+ `stats_url_id`=%s
+ORDER BY
+ `stats_userid` ASC",
+ array(bigintval(getRequestParameter('url_id'))), __FILE__, __LINE__);