WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12025 closed defect (bug) (invalid)

blog_id is set to 0 in wp_x_options?

Reported by: wpmuguru Owned by: ryan
Milestone: Priority: normal
Severity: normal Version:
Component: Multisite Keywords:
Focuses: Cc:

Description

MU Trac Ticket: http://trac.mu.wordpress.org/ticket/1182

Hello there,

I'm trying to extract the blogname and blog URL from the database for several blogs at the same time, but I'm having a problem setting up the join, because the blog_id field in the options tables for each individual blog is set to 0.

For example:

mysql> select * from wp_2_options where option_name="blogname";

+-----------+---------+-------------+-----------------+----------+

| option_id | blog_id | option_name | option_value | autoload |

+-----------+---------+-------------+-----------------+----------+

| 3 | 0 | blogname | Human Resources | yes |

+-----------+---------+-------------+-----------------+----------+

Shouldn't the blog_id be "2"?

Change History (2)

comment:1 @scribu5 years ago

  • Component changed from Database to Multisite
  • Milestone changed from Unassigned to 3.0

comment:2 @nacin5 years ago

  • Milestone 3.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

As mentioned in the other ticket, the blog_id field in wpdb->options isn't used and has nothing to do with MU/MS.

Note: See TracTickets for help on using tickets.