How to ignore where clause if condition is empty in Yii2 – Mysql
I know this same question is already asked before. But I have tried the solution but it's not working for me. $comp_ids = AllowArea::find() ->select(['comp_code']) ->where(['user_id' => Yii::$app->user->id]) ->column(); $ref = (new yiidbQuery()) ->select([ 'ProductCode', 'ProductNameFull', 'ProductSpec', 'ProductGroup', 'CompanyCode', 'CompanyName'…