Wiki

Articles tagged with "search", sorted by date (updated)X
Displaying 1-10 of 18 result(s).

Drills : Search by a HAS_MANY relation in Yii 2.0

Updated 2 months ago by softarkTutorials4 comments – viewed 57,532 times – ( +19 / -1 ) – version 2.0
This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.

How to create a criteria condition for a multiple value text search i.e a "LIKE IN"

Updated about a year ago by tophHow-tos2 comments – viewed 39,285 times – ( +1 / -2 ) – version 1.1
This is a shortcut for adding a text search for multiple values i.e.

Building a search GET request with scenarios ; calling a SearchModel from URLs...

Updated 2 years ago by Louis GacTips0 comments – viewed 9,737 times – ( +1 / -1 ) – version 2.0
Search Models are a very elegant and powerful way to build an Active Data Provider. If you use them a lot, you'll quickly need to use scenarios, which will lead you to a very DRY Controller code.
tags: search, get, Scenarios

Searching and Sorting by Count of Related Items in CGridView

Updated 3 years ago by softarkHow-tos14 comments – viewed 47,595 times – ( +33 / -1 ) – version 1.1
Let's say we have two models and relation between them:

Drills : Search by a HAS_MANY relation in Yii 1.1

Updated 3 years ago by softarkTutorials13 comments – viewed 51,447 times – ( +34 / -1 ) – version 1.1
Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider in Yii 1.1. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.

How to display Dependent drop-down value using ajax call with dynamically

Updated 3 years ago by Ankit ModiTutorials4 comments – viewed 34,334 times – ( +3 / -3 ) – version all
Hi Friends, In this tutorial I write a code display dependent drop-down value using ajax call.

Expert's model generation with Gii

Updated 3 years ago by le_topTips0 comments – viewed 9,706 times – ( +3 / -1 ) – version 1.1
Efficient coding with Yii implies efficient use of the code generator. This article shares the personalised Gii templates that were built starting from the standard templates proposed by AweGen.

Search scenario (CGridView, etc.): avoid default values from database as search condition.

Updated 3 years ago by le_topTips1 comment – viewed 6,531 times – ( +1 / -1 ) – version 1.1
Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

Yii2 default values for Index data Provider

Updated 3 years ago by CTalaTips3 comments – viewed 20,043 times – ( +4 / -1 ) – version 2.0
Guys,

Take more control of CGridview and model searching (related model or another controller)

Updated 3 years ago by CeBeHow-tos5 comments – viewed 32,827 times – ( +5 / -1 ) – version 1.1
Suppose you have an Application in Yii that manages hotels each one has many customers.