Wiki

Articles tagged with "cdbcriteria", sorted by date (updated)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"

Updated 7 days ago by CeBeHow-tos1 comment – viewed 4,061 times – version 1.1
This is a shortcut for adding a text search for multiple values i.e.

1:n relations sometimes require CDbCriteria.together

Updated 3 months ago by fsbTips4 comments – viewed 22,144 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.

Using sub query for doubletts

Updated 12 months ago by mbTips3 comments – viewed 6,075 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.

Custom Archive in Blog system

Updated about a year ago by nirmalrokaTips0 comments – viewed 3,369 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.

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

Updated 2 years ago by jwernerTips1 comment – viewed 20,698 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.