src/Codeception/Module/WPDb.php
public function grabBlogTableName($blogId, $table)
    {
        $blogTableNames = $this->grabBlogTableNames($blogId);

        if (!count($blogTableNames)) {
            throw new ModuleException($this, 'No tables found for blog with ID ' . $blogId);
        }

        foreach ($blogTableNames as $candidate) {
            if (strpos($candidate, $table) === false) {
                continue;
            }
            return $candidate;
        }

        return '';
    }
public function grabBlogTableName($blogId, $table)
    {
        $blogTableNames = $this->grabBlogTableNames($blogId);

        if (!count($blogTableNames)) {
            throw new ModuleException($this, 'No tables found for blog with ID ' . $blogId);
        }

        foreach ($blogTableNames as $candidate) {
            if (strpos($candidate, $table) === false) {
                continue;
            }
            return $candidate;
        }

        return '';
    }
public function grabBlogTableName ( $ blogId , $ table ) { $ blogTableNames = $ this -> grabBlogTableNames ( $ blogId ) ; if ( ! count ( $ blogTableNames ) ) { throw new ModuleException ( $ this , 'No tables found for blog with ID ' . $ blogId ) ; } foreach ( $ blogTableNames as $ candidate ) { if ( strpos ( $ candidate , $ table ) === false ) { continue ; } return $ candidate ; } return '' ; }
Returns the full name of a table for a blog from a multisite installation database.

@example
```php
$blogOptionTable = $I->grabBlogTableName($blogId, 'option');
```

@param int    $blogId The blog ID.
@param string $table  The table name, without table prefix.

@return string The full blog table name, including the table prefix or an empty string
if the table does not exist.

@throws \Codeception\Exception\ModuleException If no tables are found for the blog.
Returns the full name of a table for a blog from a multisite installation database .