- $tables = array( 'page', 'categorylinks', 'category' );
- $fields = array( 'page_title', 'page_namespace', 'page_len',
- 'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title',
- 'cat_subcats', 'cat_pages', 'cat_files' );
- $conds = array( 'cl_to' => $this->title->getDBkey() );
- $opts = array(
- 'USE INDEX' => array( 'categorylinks' => 'cl_sortkey' ),
- 'LIMIT' => $this->limit + 1,
- );
- $joins = array( 'categorylinks' => array( 'INNER JOIN', 'cl_from = page_id' ),
- 'category' => array( 'LEFT JOIN', 'cat_title = page_title AND page_namespace = ' . NS_CATEGORY ) );
-