Snippet >> PHPFanbase >> Show Countries

There are other snippets around for PHPFanbase that show things like total members, last update day, pending members, last three added members, etc, but I thought there should be one that told how many countries are listed on the members list. So I figured this out. It only works if you use PHPFanbase for your members list.

<? include(“config.php”);
$query=”SELECT DISTINCT country FROM $table WHERE apr=’y'”;
$result=mysql_query($query);
$num=mysql_numrows($result);
?>Countries: <b><?=$num?></b>


Page Views: 10 views

Leave a Reply

icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif 

CommentLuv badge