samedi 14 mars 2020

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'events.order_reference' in 'field list'

What's wrong with my query builder? the column corresponding with my table in mysql this is the error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'events.order_reference' in 'field list'

Here is it my query builder

Attendee::select('attendees.id','attendees.event_id','attendees.first_name','attendees.last_name','attendees.email',
                    'attendees.has_arrived', 'attendees.phone_number', 'attendees.school', 'events.order_reference')
            ->leftJoin('events', 'events.id', '=', 'attendees.event_id')
            ->where('attendees.event_id', $event_id)
            ->where('attendees.is_cancelled',0)
            ->where('attendees.is_refunded',0)
            ->get();


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire