Skip to content

Union not working? #990

Closed
Closed
@kunzelmanm

Description

@kunzelmanm

Just trying to implement the simple example from the Query Builder docs:
$first = DB::table('users')
->whereNull('first_name');

$users = DB::table('users')
->whereNull('last_name')
->union($first)
->get();

    $first = DB::table('content')
    ->where('type' , '=', 'webcast');

    $second = DB::table('content')
        ->where('type', '=', 'video')
        ->union($first)
        ->get();

All I end up being returned is the results of the second query. Both queries individually return the expected data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions