Wiki

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

CGridView, CListView and CActiveDataProvider

Created 5 years ago by softarkTutorials22 comments – viewed 122,962 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.

Drills : Search by a HAS_MANY relation in Yii 1.1

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

Searching and Sorting by Count of Related Items in CGridView

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

Filter / Search with CListView

Created 6 years ago by JohnPollardHow-tos9 comments – viewed 44,422 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 Yii Search to Your Browser Search Box

Created 7 years ago by qiangTips1 comment – viewed 45,523 times – ( +28 / -1 ) – version 1.1
The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.
tags: search

Drills : Search by a HAS_MANY relation in Yii 2.0

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

Adding search to Yii blog example (using Zend Lucene)

Created 6 years ago by dckurushinTutorials21 comments – viewed 76,016 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.

Using standard filters in CGridView custom fields

Created 7 years ago by GOshaHow-tos4 comments – viewed 64,235 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:

Search method of a model for filters when using dates - unixtimestamp in database

Created 6 years ago by MukkeTips1 comment – viewed 29,572 times – ( +10 / -1 ) – version 1.1
I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

Adding a date range search for CGridView the easy way

Created 4 years ago by mikewalenTips6 comments – viewed 32,920 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.