Inpsyde\MultilingualPress\Database\WPDBTableDuplicator::duplicate_table PHP Method

duplicate_table() public method

Creates a new table that is an exact duplicate of an existing table.
Since: 3.0.0
public duplicate_table ( string $existing_table, string $new_table ) : boolean
$existing_table string Name of the existing table.
$new_table string Name of the new table.
return boolean Whether or not the table was duplicated successfully.
    public function duplicate_table($existing_table, $new_table)
    {
        return (bool) $this->db->query("CREATE TABLE IF NOT EXISTS {$new_table} LIKE {$existing_table}");
    }