Wiki

Articles tagged with "cdbcriteria"X
Displaying 1-5 of 5 result(s).

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

Created 2 months ago by tophHow-tos1 comment – viewed 3,910 times – version 1.1
This is a shortcut for adding a text search for multiple values i.e.

Custom Archive in Blog system

Created about a year ago by nirmalrokaTips0 comments – viewed 3,357 times – ( +2 ) – version 1.1
Hi I had made simple archive system for blog system that can handle tbl_post. I had used simple CDbCriteria not more than that. I know there is more and many better way to this but I think this will give some idea to users to generate new idea or customized or modified this version of code.

Using sub query for doubletts

Created about a year ago by mbTips3 comments – viewed 6,054 times – ( +1 ) – version 1.1
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

1:n relations sometimes require CDbCriteria.together

Created 2 years ago by fsbTips4 comments – viewed 22,067 times – ( +16 ) – version 1.1
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

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

Created 3 years ago by MukkeTips1 comment – viewed 20,659 times – ( +10 ) – 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.