Yii framework CHtml::image() example

CHtml::image() is helper for generate HTML img tag in Yii framework. 1.Class Reference public static string image(string $src, ...

Gii generate model and CRUD for Module

Gii is a web-based code generator tool for Yii framework to help developer create new source code easier and faster. It save developer's...

yii - role base access control for module

After adding source code for role base access control validation (RBAC validation )for application. You can check the access role in Modul...

yii - customize the error message of a validation rule

Validators extending from CValidator all have a property named message. You can set this property in the corresponding validation rule to ...

yii - register client script adding javascript & css file in view example

Yii have CClientScript package which supports us register client script like javascript and css file in view. For better performance, we s...

Yii migration insert data to table

To insert data into any table using yii migration. You can use insert method of CDbMigration class. For example, I have table called ...

List of mysql column type declaration in Yii migration

Yii supports database migration via the yiic migrate command line tool. This tool supports creating new migrations, applying/reverting/redoi...

Yii framework - CHtml::link() example

In this post, i try to make some spaghetti code for Yii Chtml::link() method, to get familiar with Yii Chtml::link() fast. It's may be...

yii Framework - calling model class from another module

Found a question from Yii framework forum. It's a bit late to answer, copy here and save my solution. I have 3 modules in my applica...

Multiple Database connection in Yii framework

Some ways to use multiple database connection in Yii framework. 1. Declare more database Connection in config file To use multiple databa...

[2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)

I tried Yii Framework migration by using yiic in console. when yiic migrate database, it try to connect to db following the information that...