Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1016057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:29:36+00:00 2026-05-16T10:29:36+00:00

I am currently maintaining some WordPress MU installations ( v2.9.x ) I want to

  • 0

I am currently maintaining some WordPress MU installations ( v2.9.x )

I want to create a report ( outside of wordpress ) to count the number of users that I have, and the number of blogs that I have. Each blog gets it’s own tables.

I have 4 questions:

  1. First question, do you know of a plugin that does this already? I couldn’t find one.

  2. How can I get an accurate count of active users? Using this SQL?:

    SELECT count(*) FROM wp_users WHERE deleted = 0

  3. How can I get an accurate count of active blogs? Using this SQL?

    SELECT count(*) FROM wp_blogs WHERE deleted = 0

  4. I plan to do this outside of WordPress. Is there any advantage to creating these reports from within WordPress? The SQL seems straight forward, I’m wondering if there is a benefit to using the WordPress codex to generate these reports.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:29:37+00:00Added an answer on May 16, 2026 at 10:29 am

    Since you have so many questions, it’s a bit harder to get an answer from time to time.

    As for #2 and #3, have you considered making a function in your functions.php file that will run those queries exactly like that, return them in an array and then you can output that wherever you want?

    The advantage of doing it within WordPress is the simplicity of calling it. You can create a shortcode very easily to reference it anywhere in your pages, etc.

    Just make your function, and then add to your functions.php file:

    add_shortcode('SHORTTAG', 'FUNCTION NAME');
    

    That’s just one benefit, but keeping things within WordPress just makes it more tidy and portable. If you ever need to do it again, it’s just a copy and paste from functions file to functions file.

    The reports would be easy to make, and you can even use WordPress functions to store, email or display them much easier then hand-bombing PHP yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am maintaining some Java code that I am currently converting to C#. The
I have an ASP.NET site that I am maintaining. Currently it has code that
I am currently maintaining a significant number of SQL queries. Some of them are
What are some strategies that people have had success with for maintaining a change
I have a Silverlight application that I am maintaining. I am currently using Visual
I'm currently maintaining some flex code and noticed very many functions which are declared
I'm currently maintaining some web server software and I need to perform a lot
I am currently maintaining some code, which is likely to be refactored soon. Before
I'm currently maintaining a project I've inherited from some one else and the SVN
I'm currently maintaining an "old" system written in C# .NET, removing some obsolete features

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.