Showing 201-220 of 652 items.

Radio Button List with enum values for column of type ENUM >+> incorporate into giix

Created 14 years ago by pckabeer pckabeer, updated 14 years ago by pckabeer pckabeer. 1 comment

Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue').
We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a Radio Button List, which has the enum values as options.
This is a rewrite of c@cba in the wiki article of [enumDropdownList](http://www...

6 0
3
Viewed: 29 690 times
Version: 1.1
Category: How-tos

CSV Export

Created 14 years ago by JohnPollard JohnPollard, updated 14 years ago by JohnPollard JohnPollard. 5 comments

I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.

4 0
5
Viewed: 34 556 times
Version: 1.1
Category: How-tos

Access log output from unit tests

Created 14 years ago by Mike Mike, updated 14 years ago by Mike Mike. 2 comments

Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

3 0
2
Viewed: 19 572 times
Version: 1.1
Category: Tips

How to customize the error message of a validation rule

Created 17 years ago by qiang qiang, updated 14 years ago by Yang He Yang He. 4 comments

Validators extending from [CValidator] all have a property named [message|CValidator::message]. You can set this property in the corresponding validation rule to customize the error message. For example, the following validation rule uses an error message that is different from the default one:

13 0
14
Viewed: 154 885 times
Version: 1.1
Category: Tutorials

    How to log changes of ActiveRecords?

    Created 17 years ago by pfth pfth, updated 14 years ago by Yang He Yang He. 7 comments

    A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a [CActiveRecord] Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecor...

    31 1
    47
    Viewed: 86 535 times
    Version: 1.1
    Category: Tutorials