×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
1
Language: PHP
Posted by: mohsen khashei
Added: Aug 20, 2015 5:13 AM
Views: 40
Tags: like query yii2
  1. $model = \app\models\Airports::find()
  2.                             ->select(['id', 'country_id', 'country_code', 'city', 'IATA', 'airport'])
  3.                             ->where(['OR', ['like', 'city_code', $name], [ 'like', 'IATA', $name]])
  4.                             ->limit(10)
  5.                             ->all();