What is the component, uses, how can we do and what is the better way?
Answer / Ashish Kumar Mishra
DB Component: It is used for handling database operations. To perform database operations, first, instantiate the CDbConnection class, which extends CComponent, and then use it to access various methods like createCommand(), execute(), or query(). The best practice is to use Yii's Active Record patterns (ActiveRecord or DataReader) instead of directly using DB component for a cleaner, more efficient, and easier-to-maintain code.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the naming convention in yii 2.0 framework?
What is the naming convention in yii framework? Explain
What are the advantages of yii2?
What is name of first file the loaded when yii 2.0 framework starts?
Why do yii run so fast?
What is components in yii?
What is the difference between yii & yii2?
What is the first file that gets loaded when you run a application using yii?
Benifits of yii over other frameworks?
How to use session in yii?
Explain directory structure of yii 2 framework?
How to use find() and findall () in yii2?