Yes that's the code in the pilot_public_profile.tpl, but its not working in the code for some reason.
This is what im trying,
<h3>Pilot Locations</h3>
<?php
$sql = " SELECT COUNT(pilotid) as total, location FROM phpvms_pilots GROUP BY location LIMIT 0, 9999999 ";
echo '<table cellspacing="1" cellpadding="0" border="1">';
echo '<th width="100px"><div align="left">Country Flag</div></th>';
echo '<th width="100px"><div align="center">Pilots</div></th>';
$country_info = DB::get_results('SELECT COUNT(pilotid) as total, location FROM '.TABLE_PREFIX.'pilots GROUP BY location');
foreach($country_info as $country)
{
echo '<tr>';
echo '<td align= "center">';
echo '<img src="'.Countries::getCountryImage($country->location).'" /> ';
echo 'Countries::getCountryName($userinfo->location) ';
echo '</td>';
echo '<td align="center">';
echo ' ('.$country->total.')';
echo '</td>';
echo '</tr>';
}
echo '</table>';
?>
Its outputting the flag image OK but the location name is giving me, location) ?>
Any help would be appreciated,
Cheers.