List of all Articles

Adding a un-encoded label to an Active Checkbox

When you generate a checkbox using Yii's standard ActiveField mechanism, the label is derived from the attributesLabels in the model class [snippet id=227] The above statement uses the $holiday which was created in the controller using $holiday = Holiday::find();The system will populate the label text from the $article->attributeLabels['flexible'] property and

[more...]

Using Is NOT NULL in query builder

When building where clauses it's not that well documented how to use NOT and NULL . Starting with a simple query: [snippet id=214] If we wanted to select all posts where the content had something in it [snippet id=215] Note the doubles set of square brackets, first before the 'not' and then around the parameters

[more...]