Display Number of Users

Discussion in 'Customization & add-ons' started by mdauphinais1, Jan 1, 2007.

  1. mdauphinais1

    mdauphinais1 New Member

    Joined:
    Sep 3, 2006
    Messages:
    11
    I was wondering if there is an easy way to display the total number of current amember members or do I have to do an MySQL row count query?
  2. mdauphinais1

    mdauphinais1 New Member

    Joined:
    Sep 3, 2006
    Messages:
    11
    This is what I am using now... just didn't know if there was a better way to do it?

    <?
    require("/path/to/amember/amember_config.php");
    $amember_result = mysql_query("SELECT * FROM amember_members WHERE status = '1'");
    $amember_num = mysql_num_rows($amember_result);
    $amember_lastuser = mysql_query("select login from amember_members WHERE status = '1' order by member_id desc limit 1");
    $amember_newuser = mysql_result($amember_lastuser,"login");
    mysql_close();
    ?>
    Emphatic Radio.com has <? echo $amember_num ?> members. The newest registered user is <? echo $amember_newuser ?>.

    amember_config.php contains the login info for the MySQL server.
  3. ncaahperd

    ncaahperd New Member

    Joined:
    Sep 20, 2003
    Messages:
    6
    Display total membership

    Where can you place this code? Can it be in the login file? Like for it to list number of members just under the login passoword box. Also, instead of
    The newest registered user is <? echo $amember_newuser ?>.
    where $amember_newuser is the member's USERNAME. Would prefer First Name and Last Name be listed.
    thanks
    ron
  4. aiolyfe

    aiolyfe New Member

    Joined:
    Nov 1, 2007
    Messages:
    2
    Call me crazy, but I've scoured the amember folder and I cannot find the file "amember_config.php"

    This thread is 10 months old, maybe an update has occured and the file has changed names?
  5. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    correct file name in config.inc.php

Share This Page