Wiki

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

CGridView, CListView and CActiveDataProvider

Created 5 years ago by softarkTutorials22 comments – viewed 122,891 times – ( +46 / -1 ) – version 1.1
CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

Adding search to Yii blog example (using Zend Lucene)

Created 6 years ago by dckurushinTutorials21 comments – viewed 75,984 times – ( +33 / -4 ) – version 1.1
For this tutorial I will add a search to the blog demo. The search would be based on Zend Lucene.

Searching and Sorting by Count of Related Items in CGridView

Created 5 years ago by softarkHow-tos14 comments – viewed 46,825 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

Created 5 years ago by softarkTutorials13 comments – viewed 50,512 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.

Filter / Search with CListView

Created 6 years ago by JohnPollardHow-tos9 comments – viewed 44,384 times – ( +30 / -1 ) – version 1.1
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

Adding a date range search for CGridView the easy way

Created 4 years ago by mikewalenTips6 comments – viewed 32,881 times – ( +12 / -2 ) – version 1.1
After a lot of research, everything I found on adding date range searching to a CGridView advanced search form seemed to involve adding two new public variables (e.g. $date_from, $date_to), 'safe' rules for the new variables, and a rather chunky if/elseif/else check in the search() method. This probably isn't a hassle for most, but because many of the tables in my database contain two or three and sometimes four date columns (e.g. date_created, date_modified, date_deleted etc.), it meant I was having to add up to eight public variables, the corresponding safe rules, and modifying the search() criteria for each date attribute. So, I set about creating a better way and I thought I'd share my work with the community.

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

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

Drills : Search by a HAS_MANY relation in Yii 2.0

Created 3 years ago by softarkTutorials4 comments – viewed 54,770 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.

Using standard filters in CGridView custom fields

Created 6 years ago by GOshaHow-tos4 comments – viewed 64,207 times – ( +17 / -1 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

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

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