Guest User

Untitled

a guest
Apr 25th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?= $form->field($model, 'maincatalog')->dropDownList($maincatalog, ["prompt" => Yii::t('app', 'select_cat')])->label(false) ?>
  2.  
  3. <?= $form->field($model, 'listproduct')->dropDownList($listproduct, ["prompt" => Yii::t('app', 'select_cat')])->label(false) ?>
  4.  
  5. <?= $form->field($model, 'q')->textInput(['class' => 'input'])->label('')?>
  6.  
  7.  
  8. $query = Addproduct::find()
  9. ->where(['catalog' => $maincatalog])
  10. ->andWhere(['product' => $listproduct])
  11. ->andWhere(['like', 'titleru', $q])->all();
  12.  
  13. $query = Addproduct::find();
  14.  
  15. if ( $maincatalog != NULL )
  16. $query->where(['catalog' => $maincatalog]);
  17.  
  18.  
  19. $query->andWhere(['product' => $listproduct])
  20. ->andWhere(['like', 'titleru', $q])->all();
Add Comment
Please, Sign In to add comment