What is the difference between component, extension & module in Yii

Components are the classes which can help you write the business logic on the basis of your models. Suppose all of your model files are using the same logic, So that logic can be written inside component instead of writing for each controller. Extensions are like the libraries, which basically are not dependent on your … Read more

yii: how to make a unique rule for two attributes

This can be done by Yii itself, you do not need an extension for it. However an extension can help cleaning up the rules() method as described here: http://www.yiiframework.com/extension/unique-attributes-validator/ This is the code (copied from that site) which will work without using the extension: public function rules() { return array( array(‘firstKey’, ‘unique’, ‘criteria’=>array( ‘condition’=>’`secondKey`=:secondKey’, ‘params’=>array( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)