Jump to content
ListMessenger Support Forum
Sign in to follow this  
Guest Marc

Fast access to number of subscribers

Recommended Posts

Guest Marc

Good afternoon;

In order to show stadistics in my website, I would like to show the number of subscribers which I have for a specific group of listmessenger.

The idea is to insert in my website something like <?php include 'counter.php?group_id=1' ?> if I wanna insert the number of subscribers of e.g. group number 1.

For this purpose I created the following code:


/** I load all the database stuff **/


/** I load the group**/


/** I count the subscribers**/

function total_subscribers($group_id) {
    global $db;

   $count        = 0;
    if((is_object($db)) && ($db->IsConnected())) {
        $query    = "SELECT COUNT(*) AS `total` FROM `".TABLES_PREFIX."users`";
        $result    = $db->GetRow($query);
        if(($result) && ($subscribers = (int) $result["total"])) {
            $count        = $subscribers;

/** I show the number **/


The point is that this script does not work and I was wondering if you could help me, since you know much better about how listmessenger works.

Many thanks in advance.

Share this post

Link to post
Share on other sites
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...