I am using this Query.
Safety::with( ['imageName'] )->where( ['property_id', '=', $property->property_id ], ['unit_id', '=', $property->unit_id ],['type','=', 'gas' ])->latest()->first();
I am getting error SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'where clause'
.
Is there any issue in the Query ?
2
Answers
The issue is in your
where
clause. Merge it into one array and try.Or add individually like this.
Variant 1
Variant 2
Variant 3