Yii2 + postgresql ILIKE or LIKE clause fetching irrelavant data?

Hello all,

Yii2 + postgresql ILIKE or LIKE clause fetching irrelevant data

Whatever I typed in autocomplete ajax textbox eg. blah, The result is displaying irrelevant data. It is fetching all data.

But i tried in postgreql PgAdmin query editor it works good!.

Please have a look following query-

$command = Yii::$app->getDb()->createCommand(“select id as value, brand_name as label from brands WHERE brand_name ILIKE '”. $term."%’" );

	$brands = $command->queryAll();

I tried in different methods to fetch data using ILIKE, there is no difference, the same wrong results displayed.

Am i missing something or is it bug in Yii2? (I have already worked in Yii1.1, it was fetching perfectly.)

Thanks in Advance

Sorry friends! It is my mistake, the parameter is not having value!

Please ignore this thread!!!!