skip to Main Content

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'…

VIEW QUESTION

SVG from PHP script is not working in img src

I'm trying to open SVG file first in PHP and then return this data: $file = dirname(__FILE__) . $_GET["file"] . ".svg"; if (!file_exists($file)) { $file = dirname(__FILE__) . $_GET["file"] . ".png"; if (!file_exists($file)) { throw new NotFoundHttpException(); } else header('Content-Type:…

VIEW QUESTION
Back To Top
Search