Difference between #19 and #20 of
Common Yii questions

Revision #20 has been created by migajek on Oct 31, 2011, 1:37:08 PM with the memo:

one more possible reason for Model::save not working
« previous (#19)

Changes

Title unchanged

Common Yii questions

Category unchanged

FAQs

Yii version unchanged

Tags unchanged

yii, common, questions, beginners

Content changed

[...]
return false;
}
```
if you don't want it to validate just do **$method->save(false);**

Other possible reason is that "beforeSave" method (if overridden) doesn't return "true".
 
<hr/>

### How to connect to database in controller?

#### Answer:
The best approach is to set db connection in your main.php config.
[...]
14 0
23 followers
Viewed: 44 537 times
Version: 1.1
Category: FAQs
Written by: dckurushin
Last updated by: migajek
Created on: Oct 17, 2011
Last updated: 6 years ago
Update Article

Revisions

View all history