use alias in joinWith yii2 – PHP
I'm trying to connect a relation table, and and get the max value $query->joinWith('hotelPrices') ->andWhere([HotelPrice::tableName() . '.price' => $form->prices]) ->max(HotelPrice::tableName() . '.price'); but i get this error SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'hotel_price' how to…