From bc2a6e2c01f19dcd175f7aed98f78a79d608d005 Mon Sep 17 00:00:00 2001 From: Znote Date: Sat, 11 Feb 2017 21:25:12 +0100 Subject: [PATCH] TFS 0.3 small SQL api fix --- api/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/index.php b/api/index.php index 293ffec..e3739e8 100644 --- a/api/index.php +++ b/api/index.php @@ -40,7 +40,7 @@ $players = mysql_select_single("SELECT COUNT('id') AS `count` FROM `players`;"); $response['data']['players'] = ($players !== false) ? (int)$players['count'] : 0; // online player count if ($config['TFSVersion'] != 'TFS_10') { - $online = mysql_select_single("SELECT COUNT('id') AS `count`, COUNT(DISTINCT `lastip`) AS `unique` FROM `players` WHERE `status`='1';"); + $online = mysql_select_single("SELECT COUNT('id') AS `count`, COUNT(DISTINCT `lastip`) AS `unique` FROM `players` WHERE `online`='1';"); } else { $online = mysql_select_single("SELECT COUNT(`o`.`player_id`) AS `count`, COUNT(DISTINCT `p`.`lastip`) AS `unique` FROM `players_online` AS `o` INNER JOIN `players` AS `p` ON `o`.`player_id` = `p`.`id`;"); }