Created 4 years ago by mb – Tips – 3 comments – viewed 11,815 times
( +2 )
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.
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “yourmodel.id is not defined”.
The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.
Created 5 years ago by GOsha – Tips – 3 comments – viewed 10,686 times
( +16 / -1 )
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases: