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 586485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:06:43+00:00 2026-05-13T15:06:43+00:00

In WordPress MU, I’ve tried writing my own query for this but can’t seem

  • 0

In WordPress MU, I’ve tried writing my own query for this but can’t seem to get all of the joins I really need. The result set I’m looking for would be something like:

blog_id
blog name
blog path
owner first name
owner last name

and return it all alphabetically, by blog name. The trouble I’m having is that the first and last name of the blog owner are in wp_usermeta, the blog id and path are in wp_blogs, and the blog name is in wp_[blog id here]_options, with wp_usermeta requiring the user ID from wp_users.

Is it possible to join all of this in one query?

  • 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-13T15:06:43+00:00Added an answer on May 13, 2026 at 3:06 pm

    There is not a way to combine all of the information into one result set because of the way WPMU handles the database table names.

    The best solution I have come up with is some PHP logic that gets the blogs from the wp_blogs table, uses the IDs there to gather information from the wp_X_options tables, and then builds up the information I need. It’s the same reason there is no good way to get a list of all the posts across all of the blogs with just a query. You need backend logic to build the query based on the blogs in wp_blogs.

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

Sidebar

Related Questions

Wordpress has a filter that automatically add paragraphs to posts. I can remove this
Wordpress uses friendly seo url without using htaccess. Can any explain this to me
Wordpress Experts, I am trying to retrieve all blogroll links in PHP array but
My Wordpress site has multiple custom categories and posts types all which need to
all wordpress data is stored in a database (for example mysql)... but, wordpress also
Wordpress outputs my child menus inside this ul tag... <ul class=sub-menu> how can I
Wordpress's datamodel provides extensibility through it's meta tables (aka, wp_postmeta, wp_commentmeta, wp_usermeta). This name/value
WordPress allows theme designers to place a 404.php file in their theme's directory. This
WordPress has been installed as a blog into osCommerce. I'm trying to get the
wordpress has a good support for images in general. to get new image sizes,

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.