So I'm trying to have the query count the total number of players at the location if they're at the same location, and online. But my current query is returning 0. Not sure what to try, been stuck for a few days.
<?php
include('connect.php');
$town = $info['location'];
$grabTown = mysql_query("SELECT * FROM `location` WHERE `name` = '$town'");
$t = mysql_fetch_array($grabTown);
$totPlayers = mysql_query("SELECT COUNT(*) AS player_total FROM `user_info` WHERE `location` = '$town' AND 'online' = '1'");
$totalPlayers = mysql_fetch_array($totPlayers);
$playersTotal = $totalPlayers['player_total'];
?>